cant insert into mysql date (yyyy-mm-dd) field
Posted: Sat Nov 15, 2003 1:29 am
i hav 2 selectboxes for month & yr.
All the other fields insert except the grad_date just ends up 0000-00-00.
ANY IDEAS WOULD BE GREATLY APPRECIATED!!!!
Code: Select all
<?php
$grad_date= "$grad_yr-$grad_mo-00";
$studquery="INSERT INTO student (`first`, `last`, `nick`, `ss`, `pass`, `phone`, `email`, `emph_id`, `units_left`, `grad_date`) values ('$first', '$last', '$nick', '$ss', '$pass', '$phone', '$email', '$emphasis', '$units_left', '$grad_date')";
?>ANY IDEAS WOULD BE GREATLY APPRECIATED!!!!