Re: SqLite INSERT want not write

From: Date: Thu, 19 Apr 2012 18:59:41 +0000
Subject: Re: SqLite INSERT want not write
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-317628@lists.php.net to get a copy of this message
On 19 Apr 2012, at 19:57, Steven Staples wrote: > I think all you had to do was change this line: (line 27 in the original > paste) > $sql = 'INSERT INTO bloggen (date, autor, title, teaser, content) > VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, > :title, > :teaser, :content);'; > > To this: > $sql = "INSERT INTO bloggen (date, autor, title, teaser, content) > VALUES ('' . date( 'Y-m-s H:i:s', time() ) . '', :autor, > :title, > :teaser, :content);"; > > > The issue was (without looking any deeper) the quotes... > > Try that, and let us know. Still wrong. It should be as follows. $sql = "INSERT INTO bloggen (date, autor, title, teaser, content) VALUES ('" . date( 'Y-m-s H:i:s', time() ) . "', :autor, :title, :teaser, :content);"; Incidentally, the time() in the date call is unnecessary since that's the default value for that parameter. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

« previous php.general (#317628) next »