我有问题我正在使用下面的脚本来合并表并从 mysql 获取数据
$myboxexi=mysql_query('select box.id,box.page_name,box.title,box.connect,box.type,box.uid,box.description,box.image,box.url,box.status,box.date,box.time
from boxes as box left join page_boxes as pages on box.uid=pages.uid and pages.uid="'.$session_id.'"');
while($my_boxi=mysql_fetch_array($myboxexi)){
$title=$my_boxi['title'];
$bid=$my_boxi['id'];
$ptitle=$my_boxi['page_name'];
$connect=$my_boxi['connect'];
$type=$my_boxi['type'];
$iuid=$my_boxi['uid'];
$description=$my_boxi['description'];
$image=$my_boxi['image'];
$url=$my_boxi['url'];
$appr=$my_boxi['status'];
$date=$my_boxi['date'];
$time=$my_boxi['time'];
$myinfo=mysql_query('select * from users where id="'.$iuid.'"');
$my_boxi_info=mysql_fetch_array($myinfo);
$user_id=$my_boxi_info['id'];
$user_name=$my_boxi_info['user_name'];
$thmb=$my_boxi_info['thumb'];
if(strpos($thmb,'https://') !== false) {
$thmbs=$thmb;
}else
{
$thmbs='images/thumbs/'.$thmb;
}
}
它工作正常,但问题是我得到了双重项目,比如如果我有 1 个项目然后我得到 2 个项目我该如何解决这个问题?