此代码不返回任何结果,现在显示错误。 所有我想要的是如果我点击一个碰撞,它应该带我到一个新的页面,并显示该用户从两个表中选择的所有信息。如果我从1中选择它有效但在两个中它不会
$query ='SELECT
tish_clientinfo.client_id, tish_clientinfo.firstname,
tish_images.image_name
FROM tish_clientinfo
INNER JOIN tish_images
ON tish_clientinfo.user_id = tish_images.user_id
WHERE user_id= '. $_GET['user_id'];
答案 0 :(得分:2)
ambigued name字段user_id,也许??试试这个:
$query ="SELECT
tish_clientinfo.client_id, tish_clientinfo.firstname,
tish_images.image_name
FROM tish_clientinfo
INNER JOIN tish_images
ON tish_clientinfo.user_id = tish_images.user_id
WHERE tish_clientinfo.user_id= ". intval($_GET['user_id']).";";
Saludos;)