我有一个简单的搜索查询,效果很好
$result = mysql_query("SELECT id, $column, $column2 FROM $table WHERE BINARY account_no='{$_SESSION['account']}' AND $column LIKE '$query' OR $column2 LIKE '$query'") or die(mysql_error());
$output_column=column1 or column2 //which column has been matched?
但是,当在特定列上匹配时,我希望能够找出匹配的列。
这可能吗?