mysql counting rows
#1

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.");
	}
Reply
#2

This is not MySQL, this is SQLite. Difference.
Reply
#3

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?
Reply
#4

Bump, please I need help ASAP!
Reply
#5

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.
Reply
#6

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)