My guess is you're using mysql_fetch_array to get the data, and that's what's giving you this error message, since the msg says Supplied argument is not a valid <b>result</b> resource.
I'm stating the obvious here, but you do know that the result variable you get from mysql_query is the one you're supposed to pass to mysql_fetch_array? or have you perhaps misspelled it?
-L-