I'm trying to make a plugin that use database. but i cannot write a function check table exists (if exists, it will return true). I googled about it, but i couldn't write that. how to write this? please tell me. thank you for reading my threads and answering.
4th Google result for "sqlite3 check table exists php": http://php.net/manual/en/ref.sqlite.php#56380 Same as the first Google result for "sqlite3 check table exists"
Thank you for answering. I already checked that page and tested. But there is not numRows() function. So i cannot test that.
It is not your fault, the given example is not correct for SQLite3 Both of you, take a look at this : https://bugs.php.net/bug.php?id=49303
Why don't you try with SELECT COUNT(*) instead of SELECT name? 0 will be returned if the table doesn't exist and 1 if it does.