phpOpenTracker/phpOpenTracker/Database Driver.php,1.5,1.6
Sebastian Bergmann <[email protected]>
| Newsgroups | gmane.comp.web.phpopentracker.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/phpopencounter/phpOpenTracker/phpOpenTracker/Database
In directory sc8-pr-cvs1:/tmp/cvs-serv10614/phpOpenTracker/Database
Modified Files:
Driver.php
Log Message:
Flush.
Index: Driver.php
===================================================================
RCS file: /cvsroot/phpopencounter/phpOpenTracker/phpOpenTracker/Database/Driver.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Driver.php 22 Dec 2003 03:37:55 -0000 1.5
--- Driver.php 3 Jan 2004 14:06:53 -0000 1.6
***************
*** 27,42 ****
public function __destruct() {
$this->disconnect();
! }
!
! public function prepareString($string) {
! $string = substr($string, 0, 254);
!
! if (ini_get('magic_quotes_gpc')) {
! $string = stripslashes($string);
! }
!
! $string = str_replace("'", "''", $string);
!
! return $string;
}
--- 27,31 ----
public function __destruct() {
$this->disconnect();
! $this->connection = null;
}
***************
*** 62,65 ****
--- 51,66 ----
return new phpOpenTracker_Database_ResultIterator($result);
+ }
+
+ public function quote($value) {
+ if (is_int($value) || is_double($value)) {
+ return $value;
+ } elseif (is_bool($value)) {
+ return $value ? 1 : 0;
+ } elseif (is_null($value)) {
+ return 'NULL';
+ } else {
+ return "'" . str_replace("'", "''", substr($value, 0, 254)) . "'";
+ }
}
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click