Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

mysql_num_rows()

Codes here !

Moderators: macek, egami, gesf

mysql_num_rows()

Postby holtzy » Sat Feb 15, 2003 7:40 pm

What does this mean? 'Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource"
holtzy
New php-forum User
New php-forum User
 
Posts: 2
Joined: Sat Feb 15, 2003 7:35 pm
Location: USA

Postby pootergeist » Sun Feb 16, 2003 2:28 am

it means the argument ($var) you set within the function call is not returning a resource that the script can read

remember mysql_num_rows is only for inserts and the link identifier should reference the mysql_query rather than the mysql_fetch_array/??

if everything else seems fine, try slinging an
echo mysql_error();
after your query line.
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

Postby holtzy » Sun Feb 16, 2003 7:37 am

Yep, I had the wrong variable name in there...thanks!
holtzy
New php-forum User
New php-forum User
 
Posts: 2
Joined: Sat Feb 15, 2003 7:35 pm
Location: USA


Return to mySQL & php coding

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron