Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
好的,那么我必须写什么才能对两个不同的列使用带有 OR 命令的 AND
例如:如果我mysql要选择包含国家USA AND(区号561或计数西棕榈滩)的行
会是这个样子吗?
$num_locations =mysql_query (SELECT * FROM Address WHERE Country='USA' AND (County='Palm Beach' OR 'area code' ='561');
是的,你是对的,只有一点语法修复
$num_locations =mysql_query ("SELECT * FROM Address WHERE Country='USA' AND (County='Palm Beach' OR 'area code' ='561')");