我正在运行这个 SQL 代码:
sql=" SELECT * FROM channel_did ";
$rs=mysql_query($sql,$pbx01_conn) or die(mysql_error());
$counter=0;
$display='';
while($result=mysql_fetch_array($rs))
{
$sql2="SELECT * from client where id = '".$result["client_id"]."' ";
$rs2=mysql_query($sql2,$pbx01_conn) or die(mysql_error());
$result2=mysql_fetch_array($rs2);
}
所以在channel_did
表中client_id
列是一个数字然后我在client
表中查找 id 等于channel_id.client_id
我怎样才能得到列表(从表中的列channel_did)
排序?company
client
**channel_id**
id
did
client_id
**client**
id
name
company
so client.id = channel_did.client_id