Yes, thats correct. I had a rollback and it undid my upgrade. I was not told about the rollback. but I upgraded to version c. and hopefully it will go away. Here is the code that you wanted to see:
<?php
/**
* MySQL query_factory Class.
* Class used for database abstraction to MySQL
*
* @package classes
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0
*
@version $Id: query_factory.php 5741 2007-01-31 20:37:46Z wilt $
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
/**
* Queryfactory - A simple database abstraction layer
*
*/
class queryFactory extends base {
function queryFactory() {
$this->count_queries = 0;
$this->total_query_time = 0;
$this->total_queries = 0;
}
function isProductsQuery($query) {
// we have to be sure that's it's basic, one product query
// no derived columns, no additional constraints in where clause etc.
if(strncmp($query, "select", 6) === 0) {
$anchor = "from " . TABLE_PRODUCTS . " where products_id =";
$from_pos = strpos($query, $anchor , 9);
if( $from_pos > 0) {
// only letters,commas and spaces between select and from
$temp = substr($query, 7, $from_pos - 7);
$matched = ereg("[ ,_a-z]*",$temp,$matches);
if($matched === 1) return(false);
// nothing, or only limit 1 after products_id =''
$temp = substr($query, $from_pos + strlen($anchor));
if(strlen($temp) > 0) {
$res = ereg("^'[0-9]+' limit 1$",$temp);
return($res !== 1);
}
return(true);
} else return(false);
}
return(false);
}