Reputation:
I'm scratching my head over this error. I'm trying to import a sql file through phpmyadmin and it comes up with this errors one after another and I cannot sea anything wrong with it. Can someone please analyse the lines below and let me know if they see any errors?
Thank you
--
-- Table structure for table `jos_address_members`
--
CREATE TABLE IF NOT EXISTS `jos_address_members` (
`uid` int(10) unsigned NOT NULL DEFAULT '0',
`adid` int(10) unsigned NOT NULL DEFAULT '0',
`publish` tinyint(4) NOT NULL DEFAULT '1',
`ordering` tinyint(3) unsigned NOT NULL DEFAULT '9',
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci' at line 12
Upvotes: 0
Views: 90
Reputation: 2809
Remove the comma after DEFAULT '9'
CREATE TABLE IF NOT EXISTS `jos_address_members` (
`uid` int(10) unsigned NOT NULL DEFAULT '0',
`adid` int(10) unsigned NOT NULL DEFAULT '0',
`publish` tinyint(4) NOT NULL DEFAULT '1',
`ordering` tinyint(3) unsigned NOT NULL DEFAULT '9'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Upvotes: 1