I have a website.
I recently had to extend Sqlite3 to use some functions and define some custom ones, but I now have this error message:
Fatal error: Uncaught exception 'Exception' with message 'SQLite3::__construct() expects at least 1 parameter, 0 given' line 138
this is the line 138:
$output = new functions(); $output-> bothQuery();
My class extending sqlite3:
class functions extends SQLite3 {
// Functions to sort data based on input
public function bothQuery() { /*...*/ }
function nameQuery() { /*...*/ }
function cateQuery() { /*...*/ }
}
How can I solve this?
SQLite3::__construct() expects at least 1 parameter, 0 givenI'd say find the place where the sqlite object is created and give it the parameter it very clearly states it wants? it's probably that the class extending sqlite does not construct it in the right way. it may be there:new class(). you can see there are no parameters passed in the parenthesis, as opposed toexpects at least 1 parameter. Also, where is line 138?sqlite3 classphp.net/manual/en/class.sqlite3.php