Hi,

Can anyone see why this code isn't working....

$SID = $_SESSION['svUserID'];
$AdID = $_GET['AdID'];

// get the campuses assigned
$qCampusID = "SELECT inst_id FROM ads_campuses WHERE ad_id = $AdID";
$CampusIDList = mysql_query($qCampusID, $CCB) or die(mysql_error());
$row_CampusIDList = mysql_fetch_assoc($CampusIDList);
//var_dump($row_CampusIDList);

$tmp = array();
while( $rowData = mysql_fetch_array( $CampusIDList )) {
        //print("ROW Data $rowData");
        if(!in_array($rowData['inst_id'],$tmp)){                
          $tmp[] = $rowData['inst_id'];
         }
}
//var_dump($tmp);
$cidList = implode( ',', $tmp );
//var_dump($cidList);

If I do a var_dump($row_CampusIDList); I get a value, so I know there's data
to work with. But if I do a var_dump($tmp) and var_dump($cidList), they're
both empty.

This particular value query only has 1 inst_id of 100. Other queries with
one value (99,45, etc) will work.

Very strange...
Thanks,
James

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to