0

Table structure for table tbl_appointment

CREATE TABLE IF NOT EXISTS `tbl_appointment` (
`ap_id` int( 11 ) NOT NULL ,
`ap_starting` time( 6 ) NOT NULL ,
`ap_ending` time( 6 ) NOT NULL ,
`ap_day` varchar( 255 ) NOT NULL
) ENGINE = InnoDB DEFAULT CHARSET = latin1;

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 '(6) NOT NULL, ap_ending time(6) NOT NULL, ap_day varchar(255) NOT NULL )' at line 9`

I tried to import the SQL file to phpmyadmin. the file works fine on later version of XAMPP from what I have. I tried to edit the SQL file based on the error but to no avail.

  • Could you post that code and error message as text please? – Tom V Oct 17 '15 at 7:16
  • tried the same code and it worked on my side. tried it on mysql 5.6.26. Please also check mysql error log to see anything there as well? – Nawaz Sohail Oct 17 '15 at 11:15
  • isn't these ``` the problem? – Racer SQL Oct 17 '15 at 14:10
  • @RafaelPiccinelli i am not familiar with .sql file. i am a beginner,so i use phpmyadmin GUI. So, I posted the error i was given. – Saugat Thapa Oct 17 '15 at 14:55
  • @NawazSohail where do i find mysql error log. I think i have provided the error I got in phpmyadmin – Saugat Thapa Oct 17 '15 at 14:56
1

The microsecond fractional part of your DDL (I.e. The (6)) is only supported from MySQL 5.6 onward. Most likely a compatibility issue I'm afraid.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.