Re: SqLite INSERT want not write

From: Date: Thu, 19 Apr 2012 20:00:40 +0000
Subject: Re: SqLite INSERT want not write
References: 1 2 3 4 5 6 7 8 9  Groups: php.general 
Request: Send a blank email to php-general+get-317637@lists.php.net to get a copy of this message
On Thu, Apr 19, 2012 at 12:40 PM, siefke_listen@web.de <siefke_listen@web.de> wrote: >                Hello, > > On Thu, 19 Apr 2012 15:17:06 -0400 > "Steven Staples" <sstaples@mnsi.net> wrote: > >> Ok, so I was wrong... ;)   it does happen >> >> Try this: >> $sql = "INSERT INTO bloggen (date, autor, title, teaser, content) >>        VALUES ('" . date('Y-m-d H:i:s') . "', :autor, >> :title, >>  :teaser, :content);"; > > No errors, but no entry in the database. > > >> Or >> $sql = "INSERT INTO bloggen (date, autor, title, teaser, content) >>        VALUES (NOW(), :autor, :title, :teaser, :content);"; > > > PDOException: SQLSTATE[HY000]: General error: 1 no such function: NOW > > Now is not availible in Sqlite, can use date, > Technically, it's date('now') per [1] :) RTFM FTW! http://www.sqlite.org/draft/lang_datefunc.html

« previous php.general (#317637) next »