Forums
This topic is locked
rocordsets+queries+filters=confusion
Posted 29 Jul 2004 03:25:01
1
has voted
29 Jul 2004 03:25:01 Gareth Naser posted:
Hi all, Hope someone can help me out with this problem...
I have a HTML table row with 8 collumns in it.
My db table has a url field and a category field which means all records are categorised by either 1 - 8.
I want to populate each collumn in the html field with the urls from the database, with cat1 going in the first collumn, cat 2 in the second collumn, etc and then repeat region to make sure i get them all. I've managed to do this so far by making a seperate recordset for each different category by filtering out the ones i didn't want to include.
Is there a way to do this but using just a single recordset?
Using ASP in Dreamweaver MX.
Many thanks in advance
Edited by - SK33T on 29 Jul 2004 04:49:18
Replies
Replied 29 Jul 2004 12:55:21
29 Jul 2004 12:55:21 Dave Thomas replied:
when you create the recordset and get the connections window, you can choose which fileds you want including in the SQL query.
for example, if you are selecting all it will look like SELECT * from MyTable, where the * is a wildcard for selecting ALL fields.
you could easily change this to SELECT Cat1, CAt2, CAt3, CAt7, by either using the radio button, and UN-selecting ALL, or by going into the advanced SQL window and hand typing it yourself.
Regards,
Dave
[DWMX 2004]|[FlashMX 2004 Pro]|[SQL]|[Access2000]|[ASP/VBScript]|[XP-Pro]
for example, if you are selecting all it will look like SELECT * from MyTable, where the * is a wildcard for selecting ALL fields.
you could easily change this to SELECT Cat1, CAt2, CAt3, CAt7, by either using the radio button, and UN-selecting ALL, or by going into the advanced SQL window and hand typing it yourself.
Regards,
Dave
[DWMX 2004]|[FlashMX 2004 Pro]|[SQL]|[Access2000]|[ASP/VBScript]|[XP-Pro]
Replied 29 Jul 2004 17:10:21
29 Jul 2004 17:10:21 Gareth Naser replied:
I think I might have explained incorrectly.
I can get the data i want from the database with the recordset ok. What I'm struggling to do is split the data up so that only 'cat 1' displays in the first html table cell and so on.
hope this explains a little better as i've already managed to confuse myself.
I can get the data i want from the database with the recordset ok. What I'm struggling to do is split the data up so that only 'cat 1' displays in the first html table cell and so on.
hope this explains a little better as i've already managed to confuse myself.