Jump to content
  • 0

banking_data Mysql


Jav

Question

Im getting a #1064 syntax error everytime i try to enter the banking_data table in Mysql on phpMyADmin. here is what I'm trying to install. PLEASE HELP

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `banking_data`
-- ----------------------------
DROP TABLE IF EXISTS `banking_data`;
CREATE TABLE `banking_data` (
  `PlayerUID` varchar(20) NOT NULL DEFAULT '0',
  `PlayerName` varchar(128) NOT NULL DEFAULT 'Null',
  `BankSaldo` bigint(24) NOT NULL DEFAULT '0',
  `LastUpdated` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`PlayerUID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for `character_data`
-- ----------------------------

ALTER TABLE character_data ADD CashMoney int(11) NOT NULL DEFAULT 0 AFTER Infected;

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

if im not wrong u cannot create a dataset with NOT NULL as an attribute and then use the default NULL    

DROP TABLE IF EXISTS `banking_data`;
CREATE TABLE `banking_data` (
  `PlayerUID` varchar(20) DEFAULT '0',
  `PlayerName` varchar(128)  DEFAULT 'Null',
  `BankSaldo` bigint(24)  DEFAULT '0',
  `LastUpdated` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`PlayerUID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

this should work

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...