• 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 Znote Create Guild Problem

dunnish

New Member
Joined
Jun 18, 2009
Messages
268
Solutions
1
Reaction score
3
hello! im gettings this error when when im trying to create a guild.
Code:
string(109) "INSERT INTO `guilds` (`name`, `ownerid`, `creationdata`, `motd`) VALUES ('omg123', '7', '1539548781', '');"
(query - SQL error)
Type: voidQuery (voidQuery is used for update, insert or delete from database)

Field 'checkdata' doesn't have a default value
 
What is checkdata field? It doesn't come from Gesior and OTServ either, so it's some of your custom fields in the database.

You can safely remove that field in phpmyadmin by going into "Structure" tab of your guilds table, and then clicking "delete" next to the "checkdata" field.
 
Import to schemas in your database
Code:
DROP TABLE IF EXISTS `guild_ranks`;
CREATE TABLE `guild_ranks`
(
    `id` INT NOT NULL AUTO_INCREMENT,
    `guild_id` INT NOT NULL,
    `name` VARCHAR(255) NOT NULL,
    `level` INT NOT NULL COMMENT '1 - leader, 2 - vice leader, 3 - member',
    PRIMARY KEY (`id`),
    FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

Znote/ZnoteAAC
 
@slawkens i did that but now i get
Code:
string(106) "INSERT INTO `guilds` (`name`, `ownerid`, `creationdata`, `motd`) VALUES ('SFDESF', '2', '1539598268', '');"
(query - SQL error)
Type: voidQuery (voidQuery is used for update, insert or delete from database)

Field 'checkdata' doesn't have a default value


@ClassicTiba i did that to but its dossnt work.


the code and db is working in windows but when i move the db and site its dossnt work in ubuntu 16.04(apache)php7

if anyone of you got time to help me to checkon it over teamveiwer would be greate.

thanks in advance
 
Last edited:
Import to schemas in your database
Code:
DROP TABLE IF EXISTS `guild_ranks`;
CREATE TABLE `guild_ranks`
(
    `id` INT NOT NULL AUTO_INCREMENT,
    `guild_id` INT NOT NULL,
    `name` VARCHAR(255) NOT NULL,
    `level` INT NOT NULL COMMENT '1 - leader, 2 - vice leader, 3 - member',
    PRIMARY KEY (`id`),
    FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

Znote/ZnoteAAC

Sorry, but, what your post is bringing to this thread?

We are talking about guilds, not guild_ranks, if you didn't notice.

@dunnish you are still getting the same notification, that the field 'checkdata' doesn't have a default value. So you didn't delete it as I said.
 
@slawkens i deleted it as you said.

dwjiEQ.png
GBBHrZ.png
 
im just thinking a bit and i think it could be becuse of this
PHP:
   if (!defined('ZNOTE_OS')) {
                $isWindows = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
                define('ZNOTE_OS', ($isWindows) ? 'WINDOWS' : 'LINUX');
        }
becuse its working on windows but not on linux not sure how i should do to chose ubuntu(linux)
 
Why you added checkdata into query??? Now you get "Unknown column" error.

Don't edit the original code!

It should look like this:
Code:
// Create the guild
mysql_insert("INSERT INTO `guilds` (`name`, `ownerid`, `creationdata`, `motd`) VALUES ('$name', '$cid', '$time', '');");
 
Back
Top