繁体   English   中英

从表中选择,其中列a不等于列b(在同一表上)且tableID = 2

[英]select from table where column a is not equal column b (on same table) and tableID = 2

select from table where column a is not equal column b (on same table) and tableID = 2

谁能给我一个简单的代码。

<?php
$query_myslot = "select from table where column a is not equal column b (on same table) and tableID = 2";
$myslot = mysql_query($query_myslot, $localhost) or die(mysql_error());
$row_myslot = mysql_fetch_assoc($myslot);
$totalRows_myslot = mysql_num_rows($myslot);
?>

尝试如下更改查询:

select * from tablename where column1 <> column2  and tableID = 2

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM