mysql php 语句
我有这些陈述。
"SELECT * FROM PLACE.country WHERE Number='" .mysql_real_escape_string($num) ."'";<br>
"SELECT * FROM PLACE.country WHERE StreetNumber='" .mysql_real_escape_string($num) ."'";<br>
"SELECT * FROM PLACE.country WHERE PostNumber='" .mysql_real_escape_string($num) ."'";
我如何将这些加入到一个声明中?
谢谢
I have these statements.
"SELECT * FROM PLACE.country WHERE Number='" .mysql_real_escape_string($num) ."'";<br>
"SELECT * FROM PLACE.country WHERE StreetNumber='" .mysql_real_escape_string($num) ."'";<br>
"SELECT * FROM PLACE.country WHERE PostNumber='" .mysql_real_escape_string($num) ."'";
how do i join these into a single statement?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
SQL
AND & OR
语句。下面是一个示例(SQL 语言):
/neurotic
The SQL
AND & OR
statement.Here's an example (in SQL):
/neurotic
使用
OR MySQL 语句
列出所有并发条件:"SELECT * FROM PLACE.country WHERE Number='" .mysql_real_escape_string($num) ."' OR StreetNumber='" .mysql_real_escape_string($num ) ."' OR PostNumber='" .mysql_real_escape_string($num) ."'";
List all concurrent conditions using
OR MySQL Statement
:"SELECT * FROM PLACE.country WHERE Number='" .mysql_real_escape_string($num) ."' OR StreetNumber='" .mysql_real_escape_string($num) ."' OR PostNumber='" .mysql_real_escape_string($num) ."'";