我正在尝试运行一个简单的mysql查询,但每次都不返回任何内容。由于某种原因,似乎有多个“OR”语句是原因。为什么呢?
返回null
mysql_query("SELECT * FROM table WHERE lower(Name)='arabic' or lower(Sub Name)='arabic' or lower(Language)='arabic'");
返回结果
mysql_query("SELECT * FROM table WHERE lower(Name)='arabic'");
答案 0 :(得分:0)
你的列名有空格,你应该用`symbol
包围列名mysql_query("SELECT * FROM table WHERE lower(`Name`)='arabic' or lower(`Sub Name`)='arabic' or lower(`Language`)='arabic'");