SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 13/08/2018, 12:22 AM   #1
IdonTmiss
Big Clucker
 
Join Date: Dec 2016
Posts: 121
Reputation: 0
Default MySQL Insert Error

I have a problem with this bit of code, so if anybody can help me, please do so

PHP Code:
    new q[500];
    
mysql_format(MyHandleqsizeof q"INSERT INTO `table_3` (`type`, `shiet`, `fact`, `price`, `level`, `owner`, `enterx`, `entery`, `enterz`, `cash`, `isthere`) \
        VALUES (%d, %d, %d, %d, %d, %d, %f, %f, %f, %d, %d)"
,
        
BI[bizid][bType],
        
BI[bizid][bSheit],
        
BI[bizid][bFact],
        
BI[bizid][bPrice],
        
BI[bizid][bLevel],
        
BI[bizid][bOwner],
        
BI[bizid][bEnterX],
        
BI[bizid][bEnterY],
        
BI[bizid][bEnterZ],
        
BI[bizid][bCash],
        
BI[bizid][bIsThere]
    );
    
mysql_pquery(MyHandleq"OnBizCreate""businessid"bizid); // THIS LINE 
PHP Code:
forward OnBizCreate(businessid);
public 
OnBizCreate(businessid)
{
    
BI[businessid][bSqlID] = cache_insert_id();
    return 
1;

pawn Code:
[plugins/mysql] mysql_pquery: callback error: parameter count does not match format specifier length

EDIT: bizid loops for the next address ( BIZ ADDRESS ) on the server
IdonTmiss is offline   Reply With Quote
Old 13/08/2018, 12:27 AM   #2
Banditul18
Huge Clucker
 
Join Date: Nov 2014
Location: Brasov,Romania
Posts: 329
Reputation: 29
Default Re: MySQL Insert Error

You missed the '%s' in the values for owner
__________________
Banditul18 is online now   Reply With Quote
Old 13/08/2018, 12:29 AM   #3
IdonTmiss
Big Clucker
 
Join Date: Dec 2016
Posts: 121
Reputation: 0
Default Re: MySQL Insert Error

Quote:
Originally Posted by Banditul18 View Post
You missed the '%s' in the values for owner
It's not owner's name but if there is/isn't an owner like true/false
IdonTmiss is offline   Reply With Quote
Old 13/08/2018, 01:00 AM   #4
IdonTmiss
Big Clucker
 
Join Date: Dec 2016
Posts: 121
Reputation: 0
Default Re: MySQL Insert Error

fixed..
IdonTmiss is offline   Reply With Quote
Reply

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
INSERT INTO mysql error OMonger Scripting Help 5 10/01/2016 07:40 PM
INSERT INTO mysql error [+rep] OMonger Scripting Help 3 10/01/2016 01:47 PM
MySQL - INSERT INTO error Rdx Scripting Help 4 19/02/2013 03:02 PM
Mysql INSERT INTO Error Larry123 Scripting Help 1 02/09/2012 04:18 PM
MySQL Insert ID Error CoaPsyFactor Scripting Help 2 08/06/2012 12:13 AM


All times are GMT. The time now is 06:48 AM.


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