$myjoinactive= array();
$query = $_SGLOBAL['db']->query("SELECT ue.*, e.*, ue.uid as fuid, ue.username as fusername FROM ".tname("userevent")." ue LEFT JOIN ".tname("event")." e ON ue.eventid=e.eventid WHERE ue.status IN (2) ORDER BY ue.dateline DESC LIMIT 0,1");
while($value = $_SGLOBAL['db']->fetch_array($query)){
$myjoinactive[] = $value;
}
我不想用系统带的参数来显示我参与了的活动。我就分开代码来显示myjoinactive,但是数据不对,连其他人的数据也带来了,官方的WHERE ue.status IN (2)
是2,3,4 我改成2后能调但有多出来的,我就用and ue.uid = $space[uid]这个来区分
$myjoinactive= array();
$query = $_SGLOBAL['db']->query("SELECT ue.*, e.*, ue.uid as fuid, ue.username as fusername FROM ".tname("userevent")." ue LEFT JOIN ".tname("event")." e ON ue.eventid=e.eventid WHERE ue.status IN (2) and ue.uid = $space[uid] ORDER BY ue.dateline DESC LIMIT 0,1");
while($value = $_SGLOBAL['db']->fetch_array($query)){
$myjoinactive[] = $value;
}
但数据为零,怎么回事?and ue.uid = $space[uid] 也有数据如uid=2 |