[英]SQL query where value smaller than number
I need to select from database banks which have the minimum <= 50 and than show the names of the banks and their tariffs.我需要从最小 <= 50 的数据库银行中进行选择,然后显示银行的名称及其关税。 I did it like this, but it doesn't work.
我是这样做的,但它不起作用。
$result = mysql_query("SELECT * FROM list1 WHERE minimum <= 50]");
while($row = mysql_fetch_array($result))
{
echo $row['bank_name'] . " - " . $row['Tarif'];
echo "<br />";
}
$result = mysql_query("SELECT * FROM list1 WHERE minimum <= 50]");
^---typo
If you had the following construct, you'd have gotten the error message:如果您具有以下构造,则会收到错误消息:
$result = mysql_query(yada yada) or die(mysql_error());
^^^^^^^^^^^^^^^^^^^^^^
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.