Page 1 of 1

selecting info & knowing what failed - please help

Posted: Mon Feb 27, 2006 3:32 am
by BigJonMX
Hi,
i have the following

Code: Select all

$q="SELECT height,girth FROM Th,Tg WHERE Th_id=Tg_id";
But sometimes there is no 'girth' record and sometimes there is no 'height' record

Is is possible to have my resultset tell me which field failed ?

$r=mysql_query($q, $connection);
if (!$r): $msg="No Records because..."

Thanx

Posted: Mon Feb 27, 2006 8:14 am
by feyd

Posted: Mon Feb 27, 2006 10:31 am
by RobertGonzalez
It looks like you are selecting two fields from two different tables without identifying which tables should be providing which data. What is your table structure for Table Th and Table Tg?