我怎样才能做出这样的事情(在 SELECT 命令中添加一些东西):
$query = "SELECT a.name,a.surname,b.email,c.phone
FROM users as a
inner join users_email as b
inner join users_phone as c
WHERE a.id=b.id AND a.id=c.id";
$query .= "ORDER BY a.surname";
$result = mysql_query($query,$con);
结果应该是:
$query = "SELECT a.name,a.surname,b.email,c.phone
FROM users as a
inner join users_email as b
inner join users_phone as c
WHERE a.id=b.id AND a.id=c.id
ORDER BY a.name";
$result = mysql_query($query,$con);
$row=mysql_num_fields($result)
...但它给出了一个错误:mysql_num_fields() 期望参数 1 是资源,在第 32 行的 C:\xampp-portable\htdocs\db\file.php 中给出的布尔值...