When I submit null in center_id (not an auto increment column) in single quotes it give me the error incorrect integer value for column center_id and when I write only the variable like this
center_id = $center_id it gives a mysql error. Please tell me what I am doing wrong with it or suggest something. Below is my query.
Insert into parent_details set center_id='$center_id',name='$name',pin='$pin' Thanks in advance.
not nullin which case it wont accept NULL values.center_idis anintdatatype, you don't need to put the value in quotes.