Posted by mantrid on 11/30/07 22:40
I am getting the following error. I cant see what is wrong. I am probably
overlooking something obvious, can anyone see what is wrong ? The sql is ok
as used elsewhere. Problem only occurs when i include the mysql_num_rows()
function
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in /home/iddsoftw/public_html/cgtcalc/addcomp.php on line 76
$sql30daycheck = "SELECT * FROM cgttransactions WHERE
companyid=$impcompanyid AND selldatetime IS NOT NULL AND bbprice IS NULL AND
selldatetime >=DATE_SUB('".$impdatetime."', INTERVAL 30 DAY) ORDER BY
selldatetime DESC "; //LIMIT 1 DATE(NOW()) > finstart AND DATE(NOW()) <
DATE_ADD(finstart, INTERVAL 1 YEAR)"
**************************
if(mysql_num_rows(mysql_query($sql30daycheck))){ <<<<<<<<
line 76
$q30daycheck = mysql_query($sql30daycheck);
while($r30daycheck =& mysql_fetch_array($q30daycheck)) {
extract($r30daycheck);
******* some code here using $r30daycheck ******
}
}
******************
Navigation:
[Reply to this message]
|