Skip to main content
GameDev.net gamedev.net
🔒 Locked 🤖 Godot

[web] [PHP] pass sql resource to function

Started by supagu Oct 12, 2006 at 4:46 AM 0 replies 450+ views
Original Post
supagu
supagu
i want to do something like this: function GetNextRow($result) { return mysql_fetch_array($result, MYSQL_NUM); } but i get an error from php: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in .... is there a special way to pass a 'resource' to a function?
markr
markr
No, it should just work.

If it's not a valid SQL resource it's because your query failed or something else. Please ensure that your error handling is robust.

Mark

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.