Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
1-you can set it at database by doing that even you do not send any data to database it will create record with its default value 2- in your insert just make the column with 0 value $sql = "INSERT INTO MyGuests (firstname, lastname, email, colWithDefValue) VALUES ('John', 'Doe', 'john@example.com', 0)";
9th Aug 2017, 5:02 PM
Melih Melik Sonmez
Melih Melik Sonmez - avatar