The error msg is "Fatal error: Call to undefined function:
escapesimple() in /usr/local/php/lib/php/DB/common.php on line 434"
Steps to reproduce:
script has these includes:
require_once "${_SERVER['DOCUMENT_ROOT']}/includes/php/get_dbi.php";
require_once "${_SERVER['DOCUMENT_ROOT']}/includes/php/MyClass.php";
get_dbi.php gets a DB connection and has:
require('DB.php');
inside MyClass:
DB_common::quoteSmart($some_string);
I get the same error if i add require_once('DB.php') to MyClass.
Can anyone verify this or suggest why this could be happening?
Well no *wonder* it's happening. $this is used in quoteSmart(). It
*has* to be called on an instance. You can't call it statically.
$db = DB::connect($dsn);
$sql = 'SELECT * FROM table WHERE col='.$db->quoteSmart($value);
--
Justin Patrin
GAH!! What a junior mistake! I knew it had to be something ridiculous but holy smoke...
Thanks a million Justin!
brian