HI,
this is a bit of a MySQL /PHP question
Imagine the following tables and fields:
customer - custId,custName
custadd - custId, addressId
address - addressId, street, town
In these tables:
customer
custId - custName
01 - John
02 - Mike
custadd
custId - addressId
01 - 01
01 - 02
02 - 02
02 - 03
address
addressId - street - town
01 - John's home - John's town
02 - company street - company town
03 - Mike's home - Mike's town
So from the above we can see that John and Mike both work at the same company address and have different homes.
In my page I want to display this as follows:
'John' lives at 'John's home' and works in 'company town'
'Mike' lives at 'Mike's home' and works in 'company town'
How can I best construct my queries and depending on that, what would be the best PhP?
Many thanks
JR
As a wise man once said: To build the house you need the stone.
Back to the Basics!
this is a bit of a MySQL /PHP question
Imagine the following tables and fields:
customer - custId,custName
custadd - custId, addressId
address - addressId, street, town
In these tables:
customer
custId - custName
01 - John
02 - Mike
custadd
custId - addressId
01 - 01
01 - 02
02 - 02
02 - 03
address
addressId - street - town
01 - John's home - John's town
02 - company street - company town
03 - Mike's home - Mike's town
So from the above we can see that John and Mike both work at the same company address and have different homes.
In my page I want to display this as follows:
'John' lives at 'John's home' and works in 'company town'
'Mike' lives at 'Mike's home' and works in 'company town'
How can I best construct my queries and depending on that, what would be the best PhP?
Many thanks
JR
As a wise man once said: To build the house you need the stone.
Back to the Basics!