original |
-> |
derivative |
$sql = " SELECT *,".
" p1.id as p1id, ".
" p1.name as p1name, ".
" p1.type as p1type, ".
" p2.id as p2id, ".
" p2.name as p2name, ".
" p2.type as p2type, ".
" affiliatedprods.type as type ".
" from affiliatedprods ".
" left join prods as p1 on p1.id = affiliatedprods.original ".
" left join prods as p2 on p2.id = affiliatedprods.derivative ".
"";
flush();
$r = mysql_query($sql) or die(mysql_error());
$n = 0;
$y = date("Y")+1;
$c = "";
while($o = mysql_fetch_object($r)) {
?>
$typ = explode(",", $o->p1type);
foreach($typ as $p) {
?>
}
?>
=$o->p1name?>
|
=$o->type?>
|
$typ = explode(",", $o->p2type);
foreach($typ as $p) {
?>
}
?>
=$o->p2name?>
|
}
?>
|
|