[Mysql] Get the fields of a query and put them on a variable
#6

This is the debug log when I try the query:
Код:
[16:03:59] >> mysql_query( Connection handle: 1 )

[16:03:59] CMySQLHandler::Query(SELECT * FROM `users` WHERE `username`='Omar' LIMIT 1) - Successfully executed.

[16:03:59] >> mysql_store_result( Connection handle: 1 )

[16:03:59] CMySQLHandler::StoreResult() - Result was stored.

[16:03:59] >> mysql_retrieve_row( Connection handle: 1 )

[16:03:59] >> mysql_fetch_field_row( Connection handle: 1 )
After that the samp-server windows close itself.

EDIT:
This happens when I change the query from:
Код:
SELECT * FROM `users` WHERE `username`='%s' LIMIT 1
to:
Код:
SELECT `username` FROM `users` WHERE `username`='%s' LIMIT 1
Код:
[16:12:04] >> mysql_query( Connection handle: 1 )

[16:12:04] CMySQLHandler::Query(SELECT `username` FROM `users` WHERE `username`='Omar' LIMIT 1) - Successfully executed.

[16:12:04] >> mysql_store_result( Connection handle: 1 )

[16:12:04] CMySQLHandler::StoreResult() - Result was stored.

[16:12:04] >> mysql_retrieve_row( Connection handle: 1 )

[16:12:04] >> mysql_fetch_field_row( Connection handle: 1 )

[16:12:04] CMySQLHandler::FetchField("username") - Omar

[16:12:04] >> mysql_free_result( Connection handle: 1 )

[16:12:04] CMySQLHandler::FreeResult() - Result was successfully free'd.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)