Why does this fail
#1

Dead Connection??

Код:
[13:20:33] ---------------------------
[13:20:33] 
[13:20:33] >> mysql_connect( )
[13:20:33] CMySQLHandler::CMySQLHandler() - constructor called.
[13:20:33] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "samp" | Username: "root" ...
[13:20:33] CMySQLHandler::Connect() - Connection was successful.
[13:20:33] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.
[13:20:54] >> mysql_real_escape_string( Connection handle: 1 )
[13:20:54] CMySQLHandler::EscapeString(Torran); - Escaped 6 characters to Torran.
[13:20:54] >> mysql_query( Connection handle: 1 )
[13:20:54] CMySQLHandler::Query(SELECT * FROM `users` WHERE `Username` = 'Torran') - Successfully executed.
[13:20:54] >> mysql_num_rows( Connection handle: 1 )
[13:20:54] CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection)
[13:21:01] >> mysql_real_escape_string( Connection handle: 1 )
Reply
#2

You must call mysql_store_result before calling mysql_num_rows.
Reply
#3

Cant believe i forgot to do that! ty
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)