Jump to content

cant insert into mysql date (yyyy-mm-dd) field


justravis

Recommended Posts

i hav 2 selectboxes for month & yr.

 

[php:1:7dde7365b6]<?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\')\";

 

?>[/php:1:7dde7365b6]

 

All the other fields insert except the grad_date just ends up 0000-00-00.

 

ANY IDEAS WOULD BE GREATLY APPRECIATED!!!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.