從插入查詢中刪除從laravel查詢生成器返回的tick。 $lng= 'a,b,c,d';
DB::table('table')->insert([trim($lng,'`') => $strr]);
Now this query adds back ticks automatically and i can't insert a record.
Output by this que
有人可以告訴我爲什麼即時通訊出現此錯誤並請如何解決此問題。 $lastDayPreviousMonth = date("Y-m-d", strtotime("last day of previous month"));
$firstDayPreviousMonth = date("Y-m-d", strtotime("first day of previous month"));
這是原始查詢 $sql = 'SELECT c.*
FROM catalogs c
LEFT JOIN (SELECT s.* FROM stock s WHERE s.date = "'.$dateOption.'") as sb
on sb.id_product = c.id_product
WHERE c.id_branch = '.Auth::user()->id_branch.