我想选择表jogos
中的所有内容,但intCategoria
为11的行除外。
$query_GameData = sprintf("SELECT * FROM `jogos` ORDER BY RAND()");
答案 0 :(得分:5)
SELECT *
FROM `jogos`
WHERE intCategoria <> 11
ORDER BY RAND()
答案 1 :(得分:2)
只需使用WHERE子句:
$query_GameData = sprintf("SELECT * FROM `jogos` where intCategoria != 11 ORDER BY RAND() ");