在 MySQL 表中,我有一行用户组。在这一行中,我有用户组编号。 我正在尝试从除 0 和 5 以外的所有用户组中获取结果。
我试过这段代码:
$sql = $db->query("
SELECT
author FROM dle_photo_post where ug<'5' and moder ='0'
");
问题是我不知道如何忽略 0 和 5。
最佳答案
SELECT
author FROM dle_photo_post where ug not in('5','0') and moder ='0'
关于php - 从忽略一些数字的sql中获取结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12814949/