@@ -16,13 +16,12 @@ class ez_sqlite3 extends ezsqlModel implements DatabaseInterface
1616 private $ ezsql_sqlite3_str = array
1717 (
1818 1 => 'Require $path and $name to open an SQLite database ' ,
19+ 2 => 'Failed to make connection to database ' ,
1920 );
2021
21- protected $ preparedValues = array ();
22-
2322 /**
2423 * Database connection handle
25- * @var connection instance
24+ * @var resource
2625 */
2726 private $ dbh ;
2827
@@ -34,7 +33,7 @@ class ez_sqlite3 extends ezsqlModel implements DatabaseInterface
3433
3534 /**
3635 * Database configuration setting
37- * @var Configuration instance
36+ * @var ConfigInterface
3837 */
3938 private $ database ;
4039
@@ -86,8 +85,8 @@ public function connect($path = '', $name = '')
8685 $ this ->show_errors ? \trigger_error ($ this ->ezsql_sqlite3_str [1 ], \E_USER_WARNING ) : null ;
8786 // Try to establish the server database handle
8887 } elseif (!$ this ->dbh = @new \SQLite3 ($ path . $ name )) {
89- $ this ->register_error ($ php_errormsg );
90- $ this ->show_errors ? \trigger_error ($ php_errormsg , \E_USER_WARNING ) : null ;
88+ $ this ->register_error ($ this -> ezsql_sqlite3_str [ 2 ] );
89+ $ this ->show_errors ? \trigger_error ($ this -> ezsql_sqlite3_str [ 2 ] , \E_USER_WARNING ) : null ;
9190 } else {
9291 $ return_val = true ;
9392 $ this ->conn_queries = 0 ;
@@ -200,7 +199,7 @@ public function query(string $query, bool $use_prepare = false)
200199 $ this ->flush ();
201200
202201 // Log how the function was called
203- $ this ->func_call = "\$db->query( \"$ query \") " ;
202+ $ this ->log_query ( "\$db->query( \"$ query \") " ) ;
204203
205204 // Keep track of the last query for debug..
206205 $ this ->last_query = $ query ;
@@ -245,7 +244,7 @@ public function query(string $query, bool $use_prepare = false)
245244 $ i = 0 ;
246245 $ this ->col_info = array ();
247246 while ($ i < @$ this ->result ->numColumns ()) {
248- $ this ->col_info [$ i ] = new \StdClass ;
247+ $ this ->col_info [$ i ] = new \stdClass ;
249248 $ this ->col_info [$ i ]->name = $ this ->result ->columnName ($ i );
250249 $ this ->col_info [$ i ]->type = null ;
251250 $ this ->col_info [$ i ]->max_length = null ;
0 commit comments