Re: excec / query on Sqlite3

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

 



On Mon, May 20, 2013 at 2:35 PM, Gilles <gr43@xxxxxxx> wrote:

> Hello,
>
> I'm not sure if it's a bug :
>
> $o_sqlite3=new SQLite3('test.sqlite');
>
> $r=$o_sqlite3->exec('');
> echo'<pre>';var_dump($r);echo'**</pre>'; // bool(true)
>
> $r=$o_sqlite3->query('');
> echo'<pre>';var_dump($r);echo'**</pre>';  // bool(false)
>
> $r=$o_sqlite3->exec(false);
> echo'<pre>';var_dump($r);echo'**</pre>';  // bool(true)
>
> $r=$o_sqlite3->query(false);
> echo'<pre>';var_dump($r);echo'**</pre>';  // bool(false)
>


It makes sense in some way, query fails because the query didn't return any
result, exec succeeds because it does not require a result. The query
itself is valid.

- Matijn

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux