我正在使用codeigniter框架,在此我使用數據表生成值來查看文件。我需要CONCAT選項來查詢這個。但是,當我使用它顯示500內部服務器錯誤。下面我給出了查詢。如何在codeigniter數據表查詢中使用CONCAT?
$this->load->library('datatables');
$this->datatables
->select("sales.id as sid, CONCAT(sales.id, ' ',sales.export_status) as chid, date, reference_no, customer_name, note, delete_status, table_name, count, inv_total, inv_discount, total_tax2, total, internal_note");
$this->datatables->join('order_table', 'order_table.id=sales.tableid', 'left');
$this->datatables->from('sales');
我不知道是什麼問題,我推薦了這麼多的鏈接,但我不能得到正確的解決方案。請引導我。提前致謝。
500內部服務器錯誤將從您的腳本,由於重定向 –
但是,當我刪除查詢中的CONCAT選項意味着它工作正常。 –
加上',FALSE);'最後在你的查詢中試試 – Saty