Esempio n. 1
0
 function getNewParserQuery($outputString)
 {
     //echo $outputString;
     //exit(0);
     $output = eval($outputString);
     if (is_a($output, 'Object')) {
         if (!$output->toBool()) {
             return "Date incorecte! Query-ul nu a putut fi executat.";
         }
     }
     $db = new DBCubrid();
     if ($output->getAction() == 'select') {
         return $db->getSelectSql($output);
     } else {
         if ($output->getAction() == 'insert') {
             return $db->getInsertSql($output);
         } else {
             if ($output->getAction() == 'update') {
                 return $db->getUpdateSql($output);
             } else {
                 if ($output->getAction() == 'delete') {
                     return $db->getDeleteSql($output);
                 }
             }
         }
     }
 }
Esempio n. 2
0
        if ($select == '') {
            return new Object(-1, "Invalid query");
        }
        $select = 'SELECT ' . $select;
        $from = $query->getFromString($with_values);
        if ($from == '') {
            return new Object(-1, "Invalid query");
        }
        $from = ' FROM ' . $from;
        $where = $query->getWhereString($with_values);
        if ($where != '') {
            $where = ' WHERE ' . $where;
        }
        $groupBy = $query->getGroupByString();
        if ($groupBy != '') {
            $groupBy = ' GROUP BY ' . $groupBy;
        }
        $orderBy = $query->getOrderByString();
        if ($orderBy != '') {
            $orderBy = ' ORDER BY ' . $orderBy;
        }
        $limit = $query->getLimitString();
        if ($limit != '') {
            $limit = sprintf(' LIMIT %d, %d', $start_count, $list_count);
        }
        return $select . ' ' . $from . ' ' . $where . ' ' . $groupBy . ' ' . $orderBy . ' ' . $limit;
    }
}
DBCubrid::$isSupported = function_exists('cubrid_connect');
/* End of file DBCubrid.class.php */
/* Location: ./classes/db/DBCubrid.class.php */
Esempio n. 3
0
 /**
 @brief
 @developer
 @return
 @access
 @param $target_name
 */
 public function isTableExists($target_name)
 {
     try {
         parent::isTableExists($target_name);
     } catch (Exception $ex) {
     }
     return FALSE;
 }