SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 01/06/2011, 06:36 PM   #1
gedux123775
Big Clucker
 
Join Date: Jun 2009
Posts: 84
Reputation: 0
Post Mysql problem

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!
gedux123775 is offline  
Old 01/06/2011, 06:38 PM   #2
PrawkC
Huge Clucker
 
Join Date: May 2011
Posts: 485
Reputation: 52
Default Re: Mysql problem

Why does

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

Look so messed up?

I assume that is where your problem lies...
PrawkC is offline  
Old 01/06/2011, 06:52 PM   #3
gedux123775
Big Clucker
 
Join Date: Jun 2009
Posts: 84
Reputation: 0
Default Re: Mysql problem

with CarInfo [playerDB [playerid] [tr]] [vSQLid] really okay
gedux123775 is offline  
Old 01/06/2011, 07:13 PM   #4
PrawkC
Huge Clucker
 
Join Date: May 2011
Posts: 485
Reputation: 52
Default Re: Mysql problem

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.
PrawkC is offline  
Old 02/06/2011, 11:15 AM   #5
gedux123775
Big Clucker
 
Join Date: Jun 2009
Posts: 84
Reputation: 0
Default Re: Mysql problem

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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with reading money from MySQL in "Clean, Simple MySQL GM" by L3th4l Dystans Help Archive 1 31/05/2011 09:19 PM
MySQL problem Pooh7 Help Archive 2 23/04/2011 07:47 PM
Problem with MySQL FlyBoy Help Archive 2 30/01/2011 02:03 AM
Mysql problem _CHoz Help Archive 0 13/09/2009 10:25 PM
problem with CWRP in linux (mysql problem) BSMan Server Support 1 16/06/2009 02:36 PM


All times are GMT. The time now is 02:12 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.