scottmac Tue Sep 30 11:13:43 2008 UTC
Modified files:
/php-src/ext/sqlite3 sqlite3.c
/php-src/ext/sqlite3/tests sqlite3_23_escape_string.phpt
Log:
SQLite3::escapeString can be static as it doesn't rely on an instance of
SQLite
http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/sqlite3.c?r1=1.13&r2=1.14&diff_format=u
Index: php-src/ext/sqlite3/sqlite3.c
diff -u php-src/ext/sqlite3/sqlite3.c:1.13 php-src/ext/sqlite3/sqlite3.c:1.14
--- php-src/ext/sqlite3/sqlite3.c:1.13 Mon Sep 15 01:00:52 2008
+++ php-src/ext/sqlite3/sqlite3.c Tue Sep 30 11:13:43 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sqlite3.c,v 1.13 2008/09/15 01:00:52 scottmac Exp $ */
+/* $Id: sqlite3.c,v 1.14 2008/09/30 11:13:43 scottmac Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1507,7 +1507,7 @@
PHP_ME(sqlite3, lastErrorMsg,
arginfo_sqlite3_lasterrormsg, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3, loadExtension,
arginfo_sqlite3_loadextension, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3, changes,
arginfo_sqlite3_changes, ZEND_ACC_PUBLIC)
- PHP_ME(sqlite3, escapeString,
arginfo_sqlite3_escapestring, ZEND_ACC_PUBLIC)
+ PHP_ME(sqlite3, escapeString,
arginfo_sqlite3_escapestring, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(sqlite3, prepare,
arginfo_sqlite3_prepare, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3, query,
arginfo_sqlite3_query, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3, querySingle,
arginfo_sqlite3_querysingle, ZEND_ACC_PUBLIC)
http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/tests/sqlite3_23_escape_string.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/sqlite3/tests/sqlite3_23_escape_string.phpt
diff -u php-src/ext/sqlite3/tests/sqlite3_23_escape_string.phpt:1.2
php-src/ext/sqlite3/tests/sqlite3_23_escape_string.phpt:1.3
--- php-src/ext/sqlite3/tests/sqlite3_23_escape_string.phpt:1.2 Fri Jul 25
21:34:15 2008
+++ php-src/ext/sqlite3/tests/sqlite3_23_escape_string.phpt Tue Sep 30
11:13:43 2008
@@ -12,7 +12,7 @@
var_dump($db->exec('CREATE TABLE test (time INTEGER, id STRING)'));
echo "INSERT into table\n";
-var_dump($db->exec("INSERT INTO test (time, id) VALUES (" . TIMENOW . ", '" .
$db->escapeString("test''%") . "')"));
+var_dump($db->exec("INSERT INTO test (time, id) VALUES (" . TIMENOW . ", '" .
SQLite3::escapeString("test''%") . "')"));
var_dump($db->exec("INSERT INTO test (time, id) VALUES (" . TIMENOW . ",
'b')"));
echo "SELECTING results\n";
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php