RE: SqLite INSERT want not write

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


> -----Original Message-----
> From: Silvio Siefke [mailto:siefke_listen@xxxxxx]
> Sent: April 19, 2012 2:53 PM
> To: php-general@xxxxxxxxxxxxx
> Subject: Re:  SqLite INSERT want not write
> 
> Hello,
> 
> On Thu, 19 Apr 2012 13:21:46 -0500
> tamouse mailing lists <tamouse.lists@xxxxxxxxx> wrote:
> 
> > Maybe this will make the syntax errors stand out more:
> >
> > http://dl.dropbox.com/u/571329/Screenshots/Picture%209.png
> 
> 
> ok i have change it to the function date, but now i has the error
> message:
> 
> PDOException: SQLSTATE[HY000]: General error: 1 SQL logic error or missing
> database
> 
> The database is present, and the tables too.
> 
> gentoo-desk db # ls
> silviosiefke.db
> gentoo-desk db # pwd
> /var/www/silviosiefke_de/inc/db
> 
> gentoo-desk ~ # php -l test.php
> No syntax errors detected in test.php
> 
> The script now -> http://nopaste.info/63fe0a9148.html
> 
> Regards
> Silvio


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.

Steve


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [Find Someone]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux