• 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 Char Bazaar in myaac doesnt work?

Status
Not open for further replies.
Solution
Use the MySQL "DEFAULT" keyword to specify a default value for the column in the table schema. For example:
SQL:
ALTER TABLE mytable MODIFY bid_account VARCHAR(255) NOT NULL DEFAULT '';
This will set the default value for the "bid_account" column to an empty string if no value is provided in the INSERT statement.

Change "mytable" to your table that the script uses.
Use the MySQL "DEFAULT" keyword to specify a default value for the column in the table schema. For example:
SQL:
ALTER TABLE mytable MODIFY bid_account VARCHAR(255) NOT NULL DEFAULT '';
This will set the default value for the "bid_account" column to an empty string if no value is provided in the INSERT statement.

Change "mytable" to your table that the script uses.
 
Solution
When an auction is created, there is no bidder yet, so bid_account should usually be initialized as 0 or NULL, depending on how your script checks for “no bidder”.

First, check the real table structure:
SQL:
SHOW TABLES LIKE '%auction%';
SHOW CREATE TABLE character_auctions;

Also check the insert query around this file/line:
Code:
system/pages/createcharacterauction.php line 1718

The quick database-side fix is usually one of these:
If your system uses 0 as “no bidder”:
SQL:
ALTER TABLE character_auctions
MODIFY bid_account INT UNSIGNED NOT NULL DEFAULT 0;

If your system uses NULL as “no bidder”:
SQL:
ALTER TABLE character_auctions
MODIFY bid_account INT UNSIGNED NULL DEFAULT NULL;

The cleaner fix is to edit the INSERT query in createcharacterauction.php and explicitly insert the initial value:
SQL:
bid_account = 0

or include it in the insert columns/values:
SQL:
INSERT INTO character_auctions (..., bid_account, ...)
VALUES (..., 0, ...);

In summary, it is basically what @GamerGoiano said: your table requires a value for bid_account, but the script is not sending one. So you either need to allow NULL, set a default value, or explicitly insert the initial value in the query. Can't read the specific line createcharacterauction.php(1718) since I don't have the system but probably is what I mentioned earlier.

Since this is a 3 year old thread I'll close it and mark it as solved to avoid unnecessary bumps.
 
Status
Not open for further replies.

Similar threads

Back
Top