Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
i keep gettign that and i checked the data fields 19,000 times and its correct, anything else it can be?

put echo mysql_error(); before it
the data fields
duplicate entry, but this only runs if successful, wierd
thanks though
i guess my query idea is bad
if ($row = mysql_fetch_array($result)) { < — gives error if failed
so i need a new approach
illu: Well, you need to put selected="selected" in whichever it is.
just check the results wildman
no
well you can code a bit smarter to reduce redundancy
but the idea must be the same
either way its .00001 of time
My way is the best and most scalable :)
true
can someone rewrite this if ($row = mysql_fetch_array($result)) { becaues that currently errors when insert fails

test $result prior to that.
i did but thats not the point
it's to echo success or failed, and continue on
yea, or mysql_affected_rows
but it wont continue because if it fails, it's erroring
If you are INSERT'ing, why the hell are you fetching data anyway?
That doesnt even make sense.

any flash coders? how can i override a library symbol thats a bitmap at runtime by just using markup/flashvars? can it be done? point to to a new http jpeg?
how else would it be done?
eh
wildman: How else could what be done? If you are issuing an INSERT statement, exactly what data do you expect to fetch to begin with?
wildman: mysql_affected_rows — Get number of affected rows by the last INSERT, UPDATE or DELETE query
just want to find out if query was TRUE or FALSE
ok thanks
Returns the number of affected rows on success, and -1 if the last query failed.
does it ever return a 0? heh
yes.
a 0 would indicate a successful query that doesnt change anything.
ok, gotcha
in my case never would be 0 because its a insert

 PHP 5 Web Hosting | PHP 5 Hosting

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Leave a Comment

You must be logged in to post a comment.


Blog Tags:

Similar posts: