Jump to content

Query Problem...


We Must Design

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.