MYSQL ip returns blank
#1

Hello guys. I am working on an auto-login code and im having problems. I am trying to retrieve an IP of a user from the database but it return blank with the following mysql error

Код:
17:19:45] CMySQLHandler::Query(SELECT `IP` FROM `users` WHERE  `Username` = 'Saurik') - Successfully executed.

[17:19:45] >> mysql_store_result( Connection handle: 1 )

[17:19:45] CMySQLHandler::StoreResult() - Result was stored.

[17:19:45] >> mysql_fetch_field_row( Connection handle: 1 )

[17:19:45] CMySQLHandler::FetchField(IP) - You cannot call this function now. (Reason: Fields/Rows are empty.)

[17:19:45] >> mysql_query( Connection handle: 1 )

Here is my code

http://pastebin.com/33bW7MUa


When i print the ip that is retrieved from the DB, its blank. >> The field IP does exist and has an ip in it <<
Reply
#2

Just going out on a limb here, as i'm shit with MYSQL Stuff and yeah but

pawn Код:
printf("oldip %s ",oldip);
Try
pawn Код:
printf("%s ",oldip);
Reply
#3

You need to use mysql_retrieve_row() to retrieve the row.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)