AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problem with MySQL (https://forums.alliedmods.net/showthread.php?t=64227)

ng1200 12-11-2007 07:03

Problem with MySQL
 
Hi,
How would I check if there were no rows returned by the query?
If I use the following:
Code:
if (dbi_num_rows(result_var) > 0)

I get this error:
Code:

Invalid DBI result handle 0
And If I use this:
Code:
if (dbi_query(db_var, query_var) == 0)

I get a tag mismatch warning.



Thanks in advance.

Zenith77 12-11-2007 08:11

Re: Problem with MySQL
 
Might want to post all your code. I also recommend using SQLX, as it's the most up to date version of the SQL/Database libraries (unless of course you have reason to specifically use DBI).

ng1200 12-12-2007 03:43

Re: Problem with MySQL
 
Alright, Thanks.
Is there any documentation on using SQLX?

purple_pixie 12-12-2007 05:55

Re: Problem with MySQL
 
The documentation I used was called "Searching for plugins that use it and read their source"

alien 12-12-2007 11:37

Re: Problem with MySQL
 
SQLx tutorial


All times are GMT -4. The time now is 11:01.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.