Pages

Subscribe:

Ads 468x60px

Labels

Tuesday, August 7, 2012

mysql select query with join not showing the results of multiple rows

Have a different question to ask? Start New Discussion Reply to this Discussion 9 Hours Ago 0

I am trying to create a search form for my database where a user can search for a customer name and all of that customers addresses will be displayed. my structure looks like this

Customer table

ID First Name Last name Company Name

Address Table

ID line 1 post code town Customer_ID

Site Table

ID Address_ID notes

I take either the first, last, or company name as an input($field) and store this as a variable along with which column they want to search in($query) then I use the following query to check the database for matching criteria

$data

No comments:

Post a Comment