A little confused about Blue's MySQL Include
#1

Hi!

Okay, so to start off, please don't shout at me if I overlooked something, I've been following the documentation on the Wiki about the BlueG's MySQL plugin, I'm not new to scripting or working with MySQL, I am however, unfamiliar with the way the MySQL callbacks (specific to BlueG's include) work in PAWNO and I seem to be having a little bit of an issue with it, I am trying to run a query to check if the player's name is in the database, I have already established successful connection to the server and when it comes time for me to check if any results have resulted at which point I run "mysql_num_rows();" it would seem the result (regardless of whether the player's name is there or not) is set to -1.

Код:
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
   	new query[128];
    format(query, sizeof(query), "SELECT * FROM `SAMP` WHERE `playername` LIKE '%s' LIMIT 0 , 30", pname);
VALUES ('Matthew_MyName', '192.168.182.124', 'No Reason, just wondering, you knwo how it is ? hehe, I do....', 'Kalvin', '15:50 11/11/2011', '16:00 11/11/2011')";
	mysql_query(query);
	mysql_store_result();
	new rows = mysql_num_rows();
	printf("%i",rows);
It prints -1 no matter what.

Does anyone see anything I've done wrong?
Thanks...

- Matt
Reply
#2

Enable mysql_debug() in OnGameModeInit, and see what's printed in the mysql_debug.txt file.

Also, the language is pawn, not "pawno", that's the IDE we use to script pawn.
Reply
#3

Thanks Calgon!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)