gpt4 book ai didi

php mysql 在 SELECT 语句中添加 *

转载 作者:行者123 更新时间:2023-11-29 03:54:26 24 4
gpt4 key购买 nike

<分区>

我怎样才能做这样的事情(向 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 中给出的 bool 值...

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com