Bigint value as null


i have a field name invoice_no defined as “bigint(20)” in my table and want to keep its default value as NULL.

but it doesnt accept it.


“doesn’t accept” isn’t a valid mysql error message

please show what you tried, and the exact error message you got

This is the echo of my query

insert into mobile_table(mobile_date,waranty,invoice_no,make,model,imei,accessories,other_acc,faults,other_info,unique_id,customer_name,customer_address1,customer_address2,customer_contact_code,customer_contact,email,mode,payment_total) values('2010/04/28','No Warranty',,'LG','5421','12345678','1. Charge Stand      ','no','1. Water damage
','','015e44f6b3254dded0f6587abcd731ab','vineet','vineet kumar','india','03',123456,'','cash',20.00)

the form doesnt gets submits.

if the query is echoing the value of invoice_no as blank and in the database if the field is set as null, the form should get submit.

if i insert the above through sql in databse directly then this error comes

#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 ''LG','5421','12345678','1. Charge Stand      ','no','1. Water damage
','','015e' at line 1

if i manaully write invoice_no and again submit the query then the error is gone


Either omit the invoice_no column from the insert statement or use the keyword DEFAULT as a value in the values clause.