The attend/primary profile insert info 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 '2945,'profile',813,'795.00')' at line 2 INSERT INTO cart(user_reg_userid,contentid,content_type,event_eventid,fee_amount) VALUES (,2945,'profile',813,'795.00') Function insert info 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 '9996,'function',813, '1','')' at line 2 INSERT INTO cart (user_reg_userid,contentid,content_type,event_eventid, function_quantity,fee_amount) VALUES (,9996,'function',813, '1','') the regid : 0 the sql: INSERT INTO registration(user_reg_userid,event_eventid,date_and_time,primary_regid, entry_mode, adm_id) VALUES (,813,'2014-12-04 16:55:40','0', 'self',0)