Thomas farley Thomas farley - 3 months ago 34
MySQL Question

SQL MariaDB server glitch

So, I have looked around and watched Yutube video on how to fix this issue, but I am a starter and there problems seem slighly different to mine, so I need help.

I noticed this error on my site:

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''1''' at line 1


This being the SQL code:

CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`trn_date` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4a ;


I do not see what I have done wrong here ?

Answer

Increment 4a not allowed remove a

  CREATE TABLE IF NOT EXISTS `xxxxxusers` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
 `email` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`trn_date` datetime NOT NULL,
PRIMARY KEY (`id`)
 ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4;
Comments