1
我有一個由我需要編輯的其他人構建的應用程序。有一個代碼區域,我找不到正確的語法......有人可以請幫忙。讓PHP讀取我的postgres select語句?
Postgres裏的select語句是這樣的:
SELECT collection|| '/' ||color AS collection
FROM table
WHERE series = 'random number' <-- this is controlled by an array in the php
在PHP
現有的代碼如下所示:
$tableName = $db->getOne('SELECT collection FROM item_series WHERE series = ?', array($series['marriage_1']));
}else{$tableName = $series['marriage_1'];}
我已經試過這一點,但它不工作:
$tableName = $db->getOne('SELECT collection, ".'/'.", color AS collection FROM item_series WHERE series = ?', array($series['marriage_1']));
}else{
$tableName = $series['marriage_1'];}
請幫我找了幾個小時的答案!