View Full Version : search on two tables with mapping IDs

04-29-2009, 11:37 AM
i have two tables and i want to search in two tables and show info about the user.
half user info records in 1st table and other half in 2nd table
if i search any user name then all info about that user will display from BOTH TABLE
the two table join with the same id

please help me by sending php code
thank you

04-29-2009, 01:14 PM
INNER JOIN (http://www.w3schools.com/sql/sql_join_inner.asp).
and add the WHERE in the end.

notice that you have to specify the table name of which column you want