thanks for the reply jeff
i dont think i explained myself at all well and have had a few other thoughts since..
The scenario is that i have 2 possible types of customer type1 paying
customers.
and type 2 non paying customers.
These are identified by a field called custype, each record contains 7 other
columns the final one being custype
each record can be identfied using the custype field as they will either be
a 1 or a 2.
the table contains the same information for both customer types, i order the
data by ensuring paying customers are returned first. Eg order by custype
field this ensures that in any list they are returned aboved ids = 2
I also wanted to ensure that i restrict the data returned so that paying
customers have more options than non paying customers.
I thought that by doing..
$custid1="select *from sametable where field = variable and custid ='1'";
$custid2="select *from sametable where field = variable and custid ='2'";
the for loop//
<table>
<tr>
echo"<td>$link1</td>
<td>$link2</td>";
file://check the conditions
if($custid1 AND
ustid2){
echo"<td>$link3</td";
}
</tr>
</table>
then it might work, but i was beginning to wonder whether i should reorganise my table, possibly by creating another table that deals solely with seperate customer types.
its only just occurred to me that at the end of the day i suppose it would be easier to have 2 seperate loops, have a query for the first loop with all the desired data into a particulare series of html tables then have a second query which would produce a new dataset and put that into html tables as the product of the 2nd loop.
or is that going to give me problems i havent thought about
.
Jeff Janes wrote:
This might work if you added another field to the database housing the id stating how many links were to be available and then use a second for loop
eg.
id=1 idlinks=3
id=2 idlinks=2
the for loop// 1st iteration
--id=1--
<table>
<tr>
second for loop// idlink=3
--links available for id=1--
<td>$link-1</td>
//end second loop
</tr>
</table>
this is if I understood your question correctly in that you want to have multiple tables showing the users and what they have access to.