Re: Re: Insert Data Into Mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jim,
With all due respect, I think you have made some good arguments and I would
tend to agree with you. All things considered, usually using a default
value like that will be a liability later. However, we dont know what this
guy is up to. There could be good reason for using that default date.
Perhaps he or his boss wants a value there because of database or indexing
constraints and they do not have control of the schema- who knows. The guy
asked his question with the particular conditions he is interested in.
Perhaps your arguments will sway him but is there really a need to grill
the guy?


On Sat, Jan 11, 2014 at 11:09 AM, Jim Giner <jim.giner@xxxxxxxxxxxxxxxxxx>wrote:

> On 1/10/2014 4:53 PM, Robert wrote:
>
>>
>> I have a date field on an html form that users may leave blank.  If they
>> do leave it blank I want to write the date 01/01/1901 into the mysql
>> table. How can I accomplish this and where in my .php script file should
>> I put the code?
>>
>> Thank You,
>> Robert
>> flahurr@xxxxxxxxxxx
>>
> Robert,
> It really makes no sense to post a completely fabricated value into your
> date field to represent 'the absence' of a date.  From now on you will be
> forced to mask that value OUT of your output displays since I'm fairly
> certain you will not want to show people that silly date value. Do you
> realize that just leaving the date = null you will accomplish the same
> thing and you won't have to 'hide' it when you call up a record and send it
> to the client?
>
> Can you give us one valid reason that you wish to do this thing?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux