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);
?>
答案 0 :(得分:0)
尝试更改您的查询,如下所示:
select * from tablename where column1 <> column2 and tableID = 2