![]() |
Error?
So im running an insert for stuff on my script and im getting this error:
Quote:
PHP Code:
Thanks, Randy |
It seems to actually do what it was supposed to but i still get that error..
Any ideas? |
What's the next line, or one with mysql_fetch_something?
|
PHP Code:
|
Isn't
mysql_num_rows for SELECT, and mysql_affected_rows for INSERT? It is a while since I communicated with the MySQL functions directly, but I am sure you're looking for mysql_affected_rows in that scenario, not mysql_num_rows.
|
Aha! You're using
mysql_num_rows on a query which doesn't return any. For INSERT, DELETE, etc. you can use mysql_affected_rows to see how many were affected by the query.Edit: WH beat me to it, but yes 'affected' for queries that don't return a result set. |
Jinx!
Enjoys the silence. |
Still getting an error:
Quote:
PHP Code:
|
You don't need to provide an argument to mysql_affected_rows because no result set is being returned from mysql_query. The only argument (and it's optional) would be if you wanted to specify the MySQL connection link.
PHP Code:
|
Thanks again.
|
| All times are GMT. The time now is 04:08 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0