数据库oracle无法上传文件或图像

时间:2016-11-01 05:35:59

标签: php oracle

当我上传文件或图片时,我收到了oracle的错误。错误如下。每个人都有这个错误的经验吗?它与等号有关吗?

ilDB Error: manipulate(MERGE INTO mob_usage a USING (SELECT 293 id, 
'cont:pg' usage_type, 1 usage_id, '-' usage_lang, 4 usage_hist_nr FROM 
DUAL) b ON (a.id = b.id AND a.usage_type = b.usage_type AND a.usage_id = 
b.usage_id AND a.usage_lang = b.usage_lang AND a.usage_hist_nr = 
b.usage_hist_nr) WHEN MATCHED THEN UPDATE SET WHEN NOT MATCHED THEN 
INSERT (a.id,a.usage_type,a.usage_id,a.usage_lang,a.usage_hist_nr) 
VALUES (b.id,b.usage_type,b.usage_id,b.usage_lang,b.usage_hist_nr))
MDB2 Error: unknown error
_doQuery: [Error message: Could not execute statement] [Last executed 
query: MERGE INTO mob_usage a USING (SELECT 293 id, 'cont:pg' 
usage_type, 1 usage_id, '-' usage_lang, 4 usage_hist_nr FROM DUAL) b ON 
(a.id = b.id AND a.usage_type = b.usage_type AND a.usage_id = b.usage_id 
AND a.usage_lang = b.usage_lang AND a.usage_hist_nr = b.usage_hist_nr) 
WHEN MATCHED THEN UPDATE SET WHEN NOT MATCHED THEN INSERT 
(a.id,a.usage_type,a.usage_id,a.usage_lang,a.usage_hist_nr) VALUES 
(b.id,b.usage_type,b.usage_id,b.usage_lang,b.usage_hist_nr)] [Native 
code: 927] [Native message: ORA-00927: missing equal sign]
#0 

实际编码如下:

if ($lobs)  // delete/insert
        {
            $this->manipulate("DELETE FROM ".$a_table." WHERE ".
                implode ($delwhere, " AND ")
                );
            $this->insert($a_table, $a_columns);

            //$r = $this->db->extended->autoExecute($a_table, $field_values, MDB2_AUTOQUERY_INSERT, null, $types);
            $this->handleError($r, "replace, delete/insert(".$a_table.")");
        }
        else    // if no lobs are used, use manipulate
        {
            $q = "MERGE INTO ".$a_table." a ".
                "USING (SELECT ".implode($val_field, ", ")." ".
                "FROM DUAL) b ON (".implode($abpk, " AND ").") ".
                "WHEN MATCHED THEN UPDATE SET ".implode($aboc, ", ")." ".
                "WHEN NOT MATCHED THEN INSERT (".implode($a, ",").") VALUES (".implode($b, ",").")";
            $r = $this->manipulate($q);
        }

sql将是这样的:

MERGE INTO mob_usage a USING (SELECT 277 id, 'cont:pg' usage_type, 1 usage_id, '-' usage_lang, 16 usage_hist_nr FROM DUAL) b ON (a.id = b.id AND a.usage_type = b.usage_type AND a.usage_id = b.usage_id AND a.usage_lang = b.usage_lang AND a.usage_hist_nr = b.usage_hist_nr) WHEN MATCHED THEN UPDATE SET WHEN NOT MATCHED THEN INSERT
(a.id,a.usage_type,a.usage_id,a.usage_lang,a.usage_hist_nr) VALUES
(b.id,b.usage_type,b.usage_id,b.usage_lang,b.usage_hist_nr)

0 个答案:

没有答案