Trying to use a selection to combine another selection

function getMyStatsUid($uid) {
$str = “select * from commentry where uid=’” . $_REQUEST[‘uid’] . “’”;
$this->result = $this->query($str);
$id.= $this->getField(‘eventid’).’,’;

            $id.= $this->getField('eventid').',';

    $ids=  trim($id,',');//die;
   // $str = "SELECT * FROM `add_event` where id IN($ids) order by id DESC" and "SELECT * FROM `commentry` where uid IN($uids) order by uid DESC";
    $str = "SELECT id, eventname, detail, `sport`, `datetime` FROM `add_event` where id IN($ids) order by id DESC" UNION "SELECT eventid, uid, comment, normalpoint, fancypoint

FROM commentry where uid=’" . $_REQUEST[‘uid’] . “’”;
$this->result = $this->query($str);


so you are here to share working code with us?

it is not working. I am trying use part of the first select statement to get another array but I am unable to get working

And what’s the problem then? What have you done yourself to get to the source of your problem?

Sponsor our Newsletter | Privacy Policy | Terms of Service