I have written an insert query but it throws an error #1136. I checked for comma and other syntax and field with NULL values are Null allowed is also checked. Its not working. I searched for similar questions but didn't help. I have tried it both the way.
1st way:
INSERT INTO postdetails SET
PostId = NULL,
EventId = 1,
FacultyId = 'hemal.desai',
InstituteId = 1,
PostTitle = 'title',
PostMsg = 'msg',
PostDate = '2014-04-22',
EventDate = '2014-04-30',
PostTime = CURRENT_TIME(),
DeleteDate = '2014-04-30',
Edited = 'No',
FileURL = 'Null',
status = 'upcoming',
reason =NULL,
oldeventdate = NULL;
and the 2nd way:
INSERT INTO postdetails (PostId, EventId, FacultyId, InstituteId, PostTitle, PostMsg, PostDate, EventDate, PostTime, DeleteDate, Edited, FileURL, status, reason, oldeventdate) VALUES (NULL, '1', 'siddhi.shah@ahduni.edu.in', '1', 'Sidddhi Mam', 'Message', '2014-04-22', '2014-04-29', CURRENT_TIME(), '2014-05-03', 'No', 'Null', 'upcoming', NULL, NULL);
My table structure is like this:
Please help me.