mysql counting rows - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: mysql counting rows (
/showthread.php?tid=600071)
[+REP] MySQL Counting rows -
E7mad - 03.02.2016
Hello, this is SQLite, can someone make me the same idea but in
MySQL
Can someone help me please?
Код:
new DBResult:qresult, count = 0;
qresult = db_query(DB: HOUSEDB, "SELECT * FROM `houses`");
if(db_num_rows(qresult) == 0)
{
print("No houses were found in the database.");
}
Re: mysql counting rows -
Vince - 03.02.2016
This is not MySQL, this is SQLite. Difference.
Re: mysql counting rows -
E7mad - 03.02.2016
Quote:
Originally Posted by Vince
This is not MySQL, this is SQLite. Difference.
|
Okay, can you give me the script to check if there are rows in "houses" table using MySQL please?
Re: mysql counting rows -
E7mad - 03.02.2016
Bump, please I need help ASAP!
Re: mysql counting rows -
ikey07 - 03.02.2016
I haven't checked how samp sqlite works but did you used native DB:db_open(name[]); ?
Also try to open database with DB Browser for SQLite (
http://sqlitebrowser.org/ ) maybe your save system gliches.
Re: mysql counting rows -
E7mad - 03.02.2016
Quote:
Originally Posted by ikey07
I haven't checked how samp sqlite works but did you used native DB:db_open(name[]); ?
Also try to open database with DB Browser for SQLite ( http://sqlitebrowser.org/ ) maybe your save system gliches.
|
Mate, my request is to write me some lines to check if there are any rows in "houses" table in
MySQL, not SQLite.