-1
此查詢返回此錯誤。如何將typecast字符串轉換爲整數 - Postgres?
操作者不存在:文本=整數LINE 2:從mas_book)作爲 OUTP其中outp.authors = 2 ^建議:否操作者給定的名稱 和參數類型(一個或多個)匹配。您可能需要增加明確的類型轉換
public function authors($ids)
{
$query = "select count(authors) from (select distinct regexp_split_to_table(author, E',') as authors
from mas_book) as outp where outp.authors = ".$ids;
$result = $this->db->query($query);
return $result->result();
}