Re: cvs: pear /DB/DB common.php ibase.php mssql.php mysql.php mysql4.php oci8.php odbc.php pgsql.php sybase.php

From: Date: Fri, 02 Jan 2004 00:41:39 +0000
Subject: Re: cvs: pear /DB/DB common.php ibase.php mssql.php mysql.php mysql4.php oci8.php odbc.php pgsql.php sybase.php
References: 1  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-15258@lists.php.net to get a copy of this message
+     * Quotes a string so it can be safely used in a query.
+     *
+     * It will return the string with single quotes around.
+     *
+     * This method gets overridden if the DBMS being used has a quote()
+     * method in its sub-class.  Those overriding methods contain notes
+     * about which data types should be used to handle BOOLEAN data in
+     * each DBMS.
  
It looks like this is not what this method is now doing.
if the
+        if (is_int($str) || is_double($str)) {
+            return $str;
I would expect this to return '$str'; .. I asked it to be quoted, but In the above code it didnt get quoted... I'm not keen to see quote do this much magic, - adding an extra method called typequote, or something for this would infer that it does more that just quote strings. It also means there is considerably less code for general quoting.. Regards Alan

« previous php.pear.cvs (#15258) next »