|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Simple Date Insert
Hello,
This is really simple, but can not find any doc on the net to help me out. Have a drop down input form with three variables year, month, day representing someones hiredate How dow I write the insert into mysql when the form is submitted insert into table_name ('date_field') values ($year$month$day) I come from an oracle back ground, php and mysql are kinda new to me? Thanks |
|
#2
|
|||||
|
|||||
|
RE: Simple Date Insert
the mysql date format is YYYY-MM-DD so the query should look like this
$query="insert into table_name ('date_field') values ($year-$month-$day)" or you could format the date before insertng it... php Code:
|
|
#3
|
|||
|
|||
|
RE: Simple Date Insert
Thanks both worked like a charm
Appreciate the help... |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Simple Date Insert |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|