Skip navigation links

MySQL Forums :: PHP :: mysql_num_rows(): supplied argument is not a valid MySQL result


Advanced Search

mysql_num_rows(): supplied argument is not a valid MySQL result
Posted by: stef an ()
Date: May 14, 2012 07:08AM

Hi,
I'm getting this error in the sidebar:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/public_html/index.php on line 58

line 58 is:
<?php
$sql = "SELECT s.name AS song_name, s.url AS song_url, s.submit_name, s.submit_time, a.name AS artist_name, a.url AS artist_url FROM song AS s, artist AS a WHERE s.artist_id = a.id ORDER BY s.id DESC LIMIT 20";
$result = runQuery($sql);
while ($row = mysql_fetch_assoc($result)) { <= 58
?>

Also, the results page gives me this at the top:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/public_html/includes/functions.ssi.php on line 106

line 106 is:
function pagify_results($sql, $letter, $songs) {
$result = runQuery($sql);
if (mysql_num_rows($result)) { <= 106
$per_page = 50;

Does anyone know what is going on?

Thanks in advance!

Options: ReplyQuote


Subject Written By Posted
mysql_num_rows(): supplied argument is not a valid MySQL result stef an 05/14/2012 07:08AM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result laptop alias 05/14/2012 07:55AM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result stef an 05/14/2012 08:46AM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result Peter Brawley 05/14/2012 10:20AM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result laptop alias 05/14/2012 11:21AM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result stef an 05/16/2012 07:43AM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result Rick James 05/16/2012 08:51AM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result stef an 05/16/2012 05:50PM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result laptop alias 05/16/2012 11:40AM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result stef an 05/16/2012 05:32PM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result stef an 05/19/2012 04:19AM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result Rick James 05/20/2012 08:55PM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result stef an 05/21/2012 06:20AM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result laptop alias 05/21/2012 06:51AM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result stef an 05/21/2012 12:15PM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result Barry Galbraith 05/21/2012 06:07PM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result Peter Brawley 05/21/2012 02:33PM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result stef an 05/21/2012 02:50PM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result Peter Brawley 05/22/2012 09:35AM
Re: mysql_num_rows(): supplied argument is not a valid MySQL result stef an 05/22/2012 12:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.