$sql = "SELECT title, nodeid FROM node
where contenttypeid='30' and starter=equal nubber(but Not a fixed number)
order by nodeid desc limit 10";
有人能帮助我吗?什么是使用“和starter = equal nubber(但不是固定数字)”
的正确方法答案 0 :(得分:0)
如果只需要整数,则可以使用(int)
代替(float)
。
$number = 12.112; //some number
$sql = "
SELECT title, nodeid
FROM node
WHERE contenttypeid= 30 and starter = " . (float) $number . "
ORDER BY nodeid desc
LIMIT 10
";