sorry, but now i'm just cunfused. it doesn't work at all now. except a bit of a table.
http://jynk.net/belinda/admin/bel_groups_imagesc.php
do you not need 2 queries and fetch arrays?
include("bel_conf.php");
$d =mysql_connect($host, $user, $pass) or die ("Unable to connect!");
mysql_select_db($db) or die ("Unable to select database!");
$sql =mysql_query("SELECT * FROM bel_photos GROUP BY grouped");
// reset the groups
$last_grouped*=-1;
// retrieve the result
while($myrow=mysql_fetch_array($sql)){
if($last_grouped==$myrow["grouped"]){// this is the same group still
$qid=$myrow["id"];
$project_title=$myrow["project_title"];
$project_title=str_replace("&","%26",$project_title);
$image_info=$myrow["image_info"];
$file_name*=$myrow["file_name"];
$page*="<img*src=\"../thumbs/th_$file_name\"*borders=\"0\">";
$tda*.="<td>$grouped(group$i)</td>";
$tdb*.="<td>$page</td>";
$tdc*.="<td>$project_title</td>";
}else{
$last_grouped*=$myrow["grouped"];
$archive .="
<table*width=\"90%\"*border=\"1\"*cellspacing=\"0\"*cellpadding=\"1\">
<tr>
$tda
</tr><tr>
$tdb
</tr><tr>
$tdc
</tr></table>
<BR>
";
$tda="";
$tdb="";
$tdc="";
}
}
print"$archive";
ps. a bit unrelated, but everytime i cut& paste from here i have to manually delete all the white space as there seems to be loadsa invis characters messing it up. do u ever find that?