我有表的结构如下:Laravel雄辩的where子句问题
`id` int(10) UNSIGNED NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`order` int(11) NOT NULL,
`category` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
我在表5个确认记录我在哪里查询表是这样的:
$recommended = App\Recommend::where('category', '=', 'editorpicks');
但结果是空的,让我直接从DB粘贴列名和值。
列名:category
值:editorpicks
。
为什么它不工作。
我也试过tinker
也。
你检查过大小写吗? – arcee123