Click here to Skip to main content
15,947,057 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
why is the date inserted as 0000-00-00 in my sql .
i know that the format of data in mysql is yyyy-mm-dd
i changed the date format which i would like to insert in mysql using below code

also i make sure that it is right after i print it
echo $date ;

when i test this code in the browsers it display 2013-07-02 while in phpmyadmin it still the same

so kindly clarify please , thanks
Updated 29-Jun-22 18:54pm

1 solution

solved , it is my mistake , in insert command i forget to write single quote
but now it is ok . thanks

$query="insert into attend(attend_date,son_id,attend_type)
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900