DB: Call to undefined function: quotesmart()
| From: | Jeff Schmidt | Date: | Tue, 04 May 2004 14:22:16 +0000 |
| Subject: | DB: Call to undefined function: quotesmart() | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-12299@lists.php.net to get a copy of this message | ||
Hello,
I've got a problem that I can't seem to overcome with the DB package. According to the pear command, I am using version:
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
DB 1.6.4 stableI have PEAR otherwise working - I'm using QuickForm for some forms, I'm even using DB to create connections to my database and have successfully run some queries with DB, so everything appears to be installed correctly. I'm getting the following error message in my logs when I try to run some of my code: [04-May-2004 06:14:29] PHP Fatal error: Call to undefined function: quotesmart() in /hsphere/local/home/welding/weldingconsultants.com/wcapp/jsAuth.php on line 245 And here's the line that is generating the error:
$query = 'insert into pending_registrations values (' .
$db->quoteSmart($uid) . ", now(), " .
$db->quoteSmart($reg_key) . ')';
$db *should* be a valid db object, as it is used a few lines above to run a query. I wonder, I know that normally, when there is an error generated while running a query, it *returns* an error object - but does the DB object itself become something other than a DB object? It almost seems like, by the point I am trying to call $db->quoteSmart(), that $db is no longer a DB object. . . however, I tried preceding the line in question with an if(DB::isError($db)) block to see if $db is an error object, and it is not getting triggered.
I'm *really* stumped. This appears like it *should* be working, and I can find no reason why I keep being told that quotesmart() is undefined. I even looked through the pear files in question.
DB/mysql.php include()s DB/common.php, and then extends from DB_common, as it should. And I looked in DB/common.php and quoteSmart() is defined. I even used get_declared_classes to try to make sure that db_common and db_mysql are declared, and they are. . .
Jeff Schmidt
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc