function __construct($table, $words, $use_boolean_mode = true, $conn)
 {
     $match = $this->_buildMatch($words, $use_boolean_mode);
     $where = $this->_buildWhere($words, $use_boolean_mode);
     $sql = "SELECT {$table}.*, {$match} %fields% FROM {$table} %tables% %left_join% " . "{$where} %where% %group% %having%  ORDER BY score DESC %order%";
     parent::__construct($sql, $conn);
 }
Exemple #2
0
 function __construct($base_class_name_or_obj, $conn, $sql = '', $magic_params = array())
 {
     if (isset($magic_params['proxy']) && $magic_params['proxy']) {
         $this->use_proxy = true;
     }
     if (is_object($base_class_name_or_obj)) {
         $this->base_class_name = get_class($base_class_name_or_obj);
         $this->base_object = $base_class_name_or_obj;
     } else {
         $this->base_class_name = $base_class_name_or_obj;
         $this->base_object = new $this->base_class_name(null, $conn);
     }
     if (!$sql) {
         parent::__construct($conn);
         $this->addTable($this->base_object->getTableName());
         $this->_addFieldsForObject($this->base_object, '', '', $magic_params);
     } else {
         parent::__construct($sql, $conn);
     }
 }
 function __construct($table, $conn = null)
 {
     parent::__construct(lmbSelectRawQuery::DEFAULT_SQL_TEMPLATE, $conn);
     $this->addTable($table);
 }