Hi, PLEASE HELP!.
what iam trying to do.
If a value is present in one table then select data from another table.
Example if the name john smith is present in one table show all data from another table.
Thanks in advance, i appreciate it.
http://dev.mysql.com/doc/refman/5.0/en/exists-and-not-exists-subqueries.html
Consider using a JOIN too SELECT * FROM table1 INNER JOIN table2 ON table1.fieldx=table2.fieldx