• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

AAC MySQL Error.. Help? Shop offer not working

Daniel Kopeć

Member
Joined
Dec 8, 2018
Messages
125
Solutions
4
Reaction score
12
Location
Poland
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'bought' in 'order clause'' in C:\xampp\htdocs\shopsystem.php:170 Stack trace: #0 C:\xampp\htdocs\shopsystem.php(170): PDO->query('SELECT * FROM `...') #1 C:\xampp\htdocs\index.php(211): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\shopsystem.php on line 170shop systems error.png
 
Last edited:

Snavy

Bakasta
Senator
Joined
Apr 1, 2012
Messages
1,244
Solutions
71
Reaction score
548
Location
Hell
you need to add bought to your table structure.
Column not found: 1054 Unknown column 'bought'

Assuming the column is meant to be used for true/ false values, try this:
SQL:
ALTER TABLE `your_table_name_here` ADD `bought` TINYINT(1) NOT NULL DEFAULT '0';
 
Last edited:
OP
Daniel Kopeć

Daniel Kopeć

Member
Joined
Dec 8, 2018
Messages
125
Solutions
4
Reaction score
12
Location
Poland
you need to add bought to your table structure.
Column not found: 1054 Unknown column 'bought'

Assuming the column is meant to be used for true/ false values, try this:
SQL:
ALTER TABLE `your_table_name_here` ADD `bought` TINYINT(1) NOT NULL DEFAULT '0';

SQL:
ALTER TABLE `z_shop_offer` ADD `bought` TINYINT(1) NOT NULL DEFAULT '0';
correct??
 
Top