Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP SQLite3 error?

Tags:

php

sqlite

How do I know if there's an error if I did $db = new SQLite3("somedb.db"); in PHP? Right now the $db doesn't really give me any sort of error?

I can check for file existance, but I'm unsure if there could be any other errors when I open a connection.

like image 962
Pwnna Avatar asked Jul 20 '26 00:07

Pwnna


1 Answers

Try:

echo $db->lastErrorMsg();
like image 136
rkulla Avatar answered Jul 22 '26 15:07

rkulla