SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 14/07/2017, 10:46 AM   #1
Lirbo
Gangsta
 
Lirbo's Avatar
 
Join Date: Jan 2014
Posts: 504
Reputation: 8
Default mysql problem

PHP Code:
[13:31:24 07/14/17] [ERRORCMySQLQuery::Execute - (error #1054) Unknown column 'pack1_name' in 'field list' (Query: "UPDATE `user_weapon_pack1` SET `pack1_name` = '', `fist` = '', `melee` = '', `unique` = '', `grenade` = '', `secondary` = '', `shotgun` = '', `sub-machine` = '', `primary` = '', `sniper` = '', `missile` = '', `spray` = '' WHERE `id` = 4") 
PHP Code:
mysql_format(sqlquerysizeof query"UPDATE `user_weapon_pack1` SET "); strcat(storequery);
    
mysql_format(sqlquerysizeof query"`pack1_name` = '%s', "DB[playerid][Pack1Name]); strcat(storequery);
    
mysql_format(sqlquerysizeof query"`fist` = '%s', "DB[playerid][Pack1Hand]); strcat(storequery);
    
mysql_format(sqlquerysizeof query"`melee` = '%s', "DB[playerid][Pack1Melee]); strcat(storequery);
    
mysql_format(sqlquerysizeof query"`unique` = '%s', "DB[playerid][Pack1Unique]); strcat(storequery);
    
mysql_format(sqlquerysizeof query"`grenade` = '%s', "DB[playerid][Pack1Grenade]); strcat(storequery);
    
mysql_format(sqlquerysizeof query"`secondary` = '%s', "DB[playerid][Pack1Secondary]); strcat(storequery);
    
mysql_format(sqlquerysizeof query"`shotgun` = '%s', "DB[playerid][Pack1Shotgun]);strcat(storequery);
    
mysql_format(sqlquerysizeof query"`sub-machine` = '%s', "DB[playerid][Pack1SubMachine]);strcat(storequery);
    
mysql_format(sqlquerysizeof query"`primary` = '%s', "DB[playerid][Pack1Primary]);strcat(storequery);
    
mysql_format(sqlquerysizeof query"`sniper` = '%s', "DB[playerid][Pack1Sniper]);strcat(storequery);
    
mysql_format(sqlquerysizeof query"`missile` = '%s', "DB[playerid][Pack1Missile]);strcat(storequery);
    
mysql_format(sqlquerysizeof query"`spray` = '%s' "DB[playerid][Pack1Spray]);strcat(storequery);
    
mysql_format(sqlquerysizeof query"WHERE `id` = %d"DB[playerid][ID]); strcat(storequery);
    
result mysql_query(sqlstore);
    
cache_delete(result); 
Lirbo is offline   Reply With Quote
Old 14/07/2017, 01:53 PM   #2
Freedom.
Big Clucker
 
Join Date: Oct 2012
Posts: 126
Reputation: 12
Default Re: mysql problem

Make sure column names are true.
Freedom. is offline   Reply With Quote
Old 14/07/2017, 01:55 PM   #3
R4nd4ll
Big Clucker
 
R4nd4ll's Avatar
 
Join Date: Jul 2017
Location: Los Santos
Posts: 191
Reputation: 105
Default Re: mysql problem

Quote:
Originally Posted by Freedom. View Post
Make sure column names are true.
Yep, The errors shows that there is a problem with the column names.
So check it again.
R4nd4ll 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
Password Hash Problem & MYSQL Saving Problem Faqahat Scripting Help 3 18/04/2016 11:54 AM
[PLUGIN]: MySQL Problem (MYSQL R39-2) zT KiNgKoNg Scripting Help 11 11/11/2014 06:20 PM
[Mysql problem] Loss of communication with the mysql base SmileyCoder General 0 29/05/2014 03:38 PM
saving system mysql(not mysql problem) martoivanov Scripting Help 0 29/08/2013 03:37 PM
Problem with reading money from MySQL in "Clean, Simple MySQL GM" by L3th4l Dystans Help Archive 1 31/05/2011 09:19 PM


All times are GMT. The time now is 06:37 PM.


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