We Must Design Posted July 5, 2007 Share Posted July 5, 2007 I am having a prblem wit the query below. When the query is carried out the number of rows that is returned is always 1 even when I know there is no rows that match the criteria. It looks like the query isn't querying where id = '$project_id' AND customer_id = '$id', it is actually just finding any row where id = '$project_id' OR customer_id = '$id'. $result = mysql_query("SELECT * FROM jobs WHERE id = '$project_id' AND customer_id = '$id'") or die(mysql_error()); $n=mysql_numrows($result); Can anyone see anything wrong with the code? Link to comment https://forums.phpfreaks.com/topic/58557-query-problem/ Share on other sites More sharing options...
soycharliente Posted July 5, 2007 Share Posted July 5, 2007 mysql_num_rows() Link to comment https://forums.phpfreaks.com/topic/58557-query-problem/#findComment-290464 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.