adrianTNT Posted November 29, 2008 Share Posted November 29, 2008 Hello, I have this code: mysql_select_db($database_site, $site); $query_Recordset_queue_to_send = "SELECT * FROM subscriptions_queue ORDER BY subscriptions_queue_id ASC LIMIT 1"; $Recordset_queue_to_send = mysql_query($query_Recordset_queue_to_send, $site) or die(mysql_error()); $row_Recordset_queue_to_send = mysql_fetch_assoc($Recordset_queue_to_send); $totalRows_Recordset_queue_to_send = mysql_num_rows($Recordset_queue_to_send); The table is empty and I should see $totalRows_Recordset_queue_to_send = 0 but it always returns the same value of the "limit", returns 1 in the above sample. Anyone knows what I did wrong? Thank you. Link to comment https://forums.phpfreaks.com/topic/134703-total-rows-for-this-query-should-be-zero-but-is-equal-to-limit/ Share on other sites More sharing options...
manny Posted April 1, 2009 Share Posted April 1, 2009 Hello, I have this code: mysql_select_db($database_site, $site); $query_Recordset_queue_to_send = "SELECT * FROM subscriptions_queue ORDER BY subscriptions_queue_id ASC LIMIT 1"; $Recordset_queue_to_send = mysql_query($query_Recordset_queue_to_send, $site) or die(mysql_error()); $row_Recordset_queue_to_send = mysql_fetch_assoc($Recordset_queue_to_send); $totalRows_Recordset_queue_to_send = mysql_num_rows($Recordset_queue_to_send); The table is empty and I should see $totalRows_Recordset_queue_to_send = 0 but it always returns the same value of the "limit", returns 1 in the above sample. Anyone knows what I did wrong? Thank you. what exatly is the variable $site? Link to comment https://forums.phpfreaks.com/topic/134703-total-rows-for-this-query-should-be-zero-but-is-equal-to-limit/#findComment-798732 Share on other sites More sharing options...
trq Posted April 1, 2009 Share Posted April 1, 2009 what exatly is the variable $site? One would assume its a connection resource with a silly name. Link to comment https://forums.phpfreaks.com/topic/134703-total-rows-for-this-query-should-be-zero-but-is-equal-to-limit/#findComment-798734 Share on other sites More sharing options...
manny Posted April 1, 2009 Share Posted April 1, 2009 Yeah that's possible Link to comment https://forums.phpfreaks.com/topic/134703-total-rows-for-this-query-should-be-zero-but-is-equal-to-limit/#findComment-798736 Share on other sites More sharing options...
adrianTNT Posted April 1, 2009 Author Share Posted April 1, 2009 what exatly is the variable $site? Hello. I am not using that generic name as variable, I just replaced site name with $site for this sample. I probably managed to fix the issue after all, because I dont remember it anymore, oops Link to comment https://forums.phpfreaks.com/topic/134703-total-rows-for-this-query-should-be-zero-but-is-equal-to-limit/#findComment-798878 Share on other sites More sharing options...
manny Posted April 1, 2009 Share Posted April 1, 2009 what exatly is the variable $site? Hello. I am not using that generic name as variable, I just replaced site name with $site for this sample. I probably managed to fix the issue after all, because I dont remember it anymore, oops well then you will have to remove it example $db = @ mysql_connect("$dbpath","$dbuser","$dbpass"); @ mysql_select_db("$dbname",$db); $db being the connection not the site name Link to comment https://forums.phpfreaks.com/topic/134703-total-rows-for-this-query-should-be-zero-but-is-equal-to-limit/#findComment-798906 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.