[kronolith] error in your SQL syntax near 'NOW() NOT NULL

Martin List-Petersen martin@list-petersen.dk
Mon, 10 Dec 2001 12:25:40 +0100


<-snip->
> >  ERROR 1064: You have an error in your SQL syntax near 'NOW() NOT NULL,
> >      event_end datetime DEFAULT NOW() NOT NULL,
> >      event_alarm i' at line 13
> >  mysql>
>
> We're still trying to find cross database compatible sql statements. No
> luck! :-/
> Remove the DEFAULT NOW() part or replace it with DEFAULT '0000-00-00
> 00:00:00'
>

<-snip->

Why not just forget the DEFAULT in this case, which should be ok for most
sql servers and handle it from the PHP code (allways putting the right
values in the fields).

Regards,
Martin List-Petersen
martin@list-petersen.dk
http://www.marlow.dk