[MYSQL]How to check if query is succesful?
#1

Hey guys im still translating my script to R39. I'm in my house system right now, and im in the menu where you can change the interior, and just in case the query isn't successful i want to say something to the player. Heres my Tquery:

pawn Код:
mysql_format(mysql, gQuery, sizeof(gQuery),"UPDATE "Houses_Table" SET Price = %i, InteriorID = %i WHERE ID = %i",HouseInfo[hID][Price], HouseInfo[hID][InteriorID], hID);
           mysql_tquery(mysql, gQuery);

What would be a way to check if it was successful?
Reply
#2

Use the callback parameter from mysql_tquery. If the callback specified hasn't been called when the query is passed, it means the query isn't successful.
Reply
#3

Sorry for me being, an idiot. I know how to use the callback function, but how do i check if the callback function was called?
Reply
#4

Use OnQueryError.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)