Re: [PATCH] sqlite: retrieve SQL syntax errors
| From: | Ilia Alshanetsky | Date: | Fri, 02 Sep 2005 19:11:45 +0000 |
| Subject: | Re: [PATCH] sqlite: retrieve SQL syntax errors | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-18659@lists.php.net to get a copy of this message | ||
> the "feature request":
>
> <?
> $db = sqlite_open(":memory:");
> sqlite_exec($db, "SELECT column");
> var_dump(sqlite_error_string(sqlite_last_error($db)));
> ?>
>
> prints "SQL logic error or missing database", but you don't have a clue
> of what error is.
> with my patch, you can retrieve the error (in the additional variable)
> you get in the Warning message ("no such column: column").
Aha, I see... that is indeed useful. +1
Ilia