Coding Problems
1 Attachment(s)
Im getting the following error when using this plugin.
Code:
L 12/17/2005 - 23:46:53: [MYSQL] Invalid result handle 0 |
|
I have seen that page already, thanks anyway. Unfortunately, I dont know enough to be able to use that info. :(
|
The plugin your using in incompatible with the version oof amxx your using.
|
Before you do dbi_numrows or any operation on a result, check if it was successful and if there was actaully data in it by doing:
Code:
|
Quote:
|
Does anyone know how to properly rewrite the DBI stuff in this plugin, more specifically:
Code:
|
Immediately after you get your result you need to check if it was successful, like Twisty said. Specifically, the following indicates the query failed:
Code:
Here's a good defensive-programming rule of thumb: Everytime you interact with the database, be it a query, an update, or any thing else... ALWAYS check your return value for failure. Do this each and every time if for no other reason than your connection could be suddenly lost since the last time you interacted with the database. |
Ok, Ive now got:
Code:
Since I am a complete newbie, I dont know if I did it correctly or not. I started up a listenserver, and got no errors. Then I changed levels, and got: Code:
So what does this mean? |
If you check for a condition, then you should do something. You don't check a condition and then move on your merry way without doing anything.
Code:
|
| All times are GMT -4. The time now is 15:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.