Re: Re: mysql create table with date or timestamp
| From: | Andrew Ballard | Date: | Thu, 28 May 2009 15:15:59 +0000 |
| Subject: | Re: Re: mysql create table with date or timestamp | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-293304@lists.php.net to get a copy of this message | ||
On Thu, May 28, 2009 at 11:15 AM, Andrew Ballard <aballard@gmail.com> wrote:
> 2009/5/28 Grega Leskovsek <mavricek@gmail.com>:
>> I GOT THIS ERROR when I tried first sample with when timestamp;
>>
>>
>> ERROR 1064 (42000): You have an error in your SQL syntax; check the
>> manual thatcorresponds to your MySQL server version for the right
>> syntax to use near 'id(iddiary) )' at line 1
>>
>>
>> 2009/5/28 João Cândido de Souza Neto <joao@consultorweb.cnt.br>:
>>> If you need date and hour the best way is:
>>>
>>> CREATE TABLE diary (
>>> iddiary int auto_increment not null,
>>> imepriimek varchar(50),
>>> when timestamp,
>>> action varchar(30),
>>> onfile varchar(100)
>>> unique id(iddiary)
>>> );
>>
>> Please advice. Thanks in advance, Grega
>
> There is a coma missing between the lines for the last column and the
> unique key.
>
> Andrew
>
Make that a 'comma', not the 'coma' that I seem to be in. :-)
Andrew