
October 24th, 2004, 01:33 AM
|
|
Moderated
|
|
Join Date: Oct 2003
Location: Monterrey MX
Posts: 49
Time spent in forums: < 1 sec
Reputation Power: 6
|
|
OK, try this...
PHP Code:
$theme_sql = "SELECT id, name FROM themes WHERE group = 2 ORDER BY id";
$theme_q = mysql_query ($theme_sql);
$theme_sql = mysql_num_rows($theme_q);
for ($i = 0; $i<$theme_sql; $i++) {
$theme_res = mysql_fetch_array ($theme_q);
$theme_id = $theme_res[id];
$theme_name = $theme_res[name];
if ($i+1==$theme_sql) {
$ids[] = $theme_id;
print "$theme_name ($theme_id)";
}
else {
print "$theme_name ($theme_id) | ";
}
}
$st_sql = "SELECT sname FROM subthemes WHERE belong_ref IN (".implode(",",$ids).")";
Bingo !

__________________
The deal is not to know everything, but to know the email of the one who does.
|