Mysql problem
#1

Hey, I have encountered a problem and what is wrong in this script?
pawn Code:
new query[256];
format( query, 256, "SELECT SQLid FROM `transportas` WHERE Model = '%d' AND cOwner = '%s'", CarInfo[playerDB[playerid][tr]][cModel],CarInfo[playerDB[playerid][tr]][cOwner] );
    mysql_query( query );
    mysql_store_result( );
    CarInfo[playerDB[playerid][tr]][vSQLid] = strval( query );
    mysql_free_result( );
Mysql log:
Code:
[21:36:04] CMySQLHandler::Query(SELECT SQLid FROM `transportas` WHERE Model = '468' AND cOwner = 'Carl_Solts') - Successfully executed.

[21:36:04] >> mysql_store_result( Connection handle: 1 )

[21:36:04] CMySQLHandler::StoreResult() - Result was stored.

[21:36:04] >> mysql_free_result( Connection handle: 1 )

[21:36:04] CMySQLHandler::FreeResult() - Result was successfully free'd.
Please help!
Reply
#2

Why does

CarInfo[playerDB[playerid][tr]][vSQLid]

Look so messed up?

I assume that is where your problem lies...
Reply
#3

with CarInfo [playerDB [playerid] [tr]] [vSQLid] really okay
Reply
#4

Hmm wait, in your db is vsqlid an int? if so then do

CarInfo[playerDB[playerid][tr]][vSQLid] = mysql_fetch_int();

assuming that you're using g stylez plugin, if not find a function similar.
Reply
#5

Don't work. What it is wrong, please help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)