DATE -TIME Question
Posted: Wed Jan 03, 2007 6:20 pm
feyd | Please use
and i get the value of this filed (user input) to the variable as:[/syntax]
The problem is such date columns does not allow the user to leave the field blank. If the field is blank the it throws an error:
"Incorrect datetime value: 'null' for column 'TargetGADateShort' at row 1insert into datahub.targetdetails"
I have to allow nulls into this column.
The weird thing is the database (mysql) allows nulls in the column and there are already a lot of nulls.
Can anyone help me how to get this into shape.
Thanks,
- Vamsi
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
I have a datetime field as:
[syntax="html"]
<input type="datetime" name="targetgadate">
Code: Select all
$target_ga_date=$_POST['targetgadate'];"Incorrect datetime value: 'null' for column 'TargetGADateShort' at row 1insert into datahub.targetdetails"
I have to allow nulls into this column.
The weird thing is the database (mysql) allows nulls in the column and there are already a lot of nulls.
Can anyone help me how to get this into shape.
Thanks,
- Vamsi
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]