12.05.2012, 11:11
Hi guys,
MySQL doesn't load a gang name. I'm getting empty string(""):
Here is mysql log:
It says Fields/Rows are empty, but they aren't empty!
How to fix this?
Sorry for my bad English...
Thanks
MySQL doesn't load a gang name. I'm getting empty string(""):
pawn Код:
printf( "Name: %s", GetGangName( 1 ) ); // Result: "Name: "
pawn Код:
stock GetGangName( gaujosID )
{
new
gPavadinimas[ 22 ]
;
format( query, sizeof( query ), "SELECT `gPavadinimas` FROM `gaujos` WHERE `gID` = %d", gaujosID );
mysql_query( query );
mysql_store_result( );
mysql_get_field( "gPavadinimas", gPavadinimas );
mysql_free_result( );
return gPavadinimas;
}
Код:
8:39:37] CMySQLHandler::Query(SELECT gPavadinimas FROM gaujos WHERE gID = 1) - Successfully executed. [18:39:37] >> mysql_store_result( Connection handle: 1 ) [18:39:37] CMySQLHandler::StoreResult() - Result was stored. [18:39:37] >> mysql_fetch_field_row( Connection handle: 1 ) [18:39:37] CMySQLHandler::FetchField(gPavadinimas) - You cannot call this function now. (Reason: Fields/Rows are empty.) [18:39:37] >> mysql_free_result( Connection handle: 1 ) [18:39:37] CMySQLHandler::FreeResult() - Result was successfully free'd.
How to fix this?
Sorry for my bad English...
Thanks