|
 |
asp_databases thread: only displaying one column of table
Message #1 by hoonboon69@h... on Sat, 24 Feb 2001 17:29:30
|
|
First...Thank you to everyone who has given me advice and help on other
questions. Now....I am writing an ASP page that will display all contents
of a table. There are 3 different columns in my table. Name, web, and
category. depending on which of these is selected via a drop down menu,
everything will be displayed alphabetically. for example... if the user
selects CATEGORY from the drop down, they will see a list of everything in
the database sorted alphabetically by the CATEGORY name. Same thing happens
if they select NAME or WEB. My problem is that everything works but it only
displays one category. The one that the user selects in the drop down menu.
It comes out alphabetical but it does not display the web and the name
category. My SQL statement looks like this....
sql="SELECT Name, Category, Web FROM table ORDER BY " & strInput
strInput is the variable for the selection made in the drop down menu.
any help would be greatly appreciated.
Message #2 by "Greg Covey" <gecovey@s...> on Sat, 24 Feb 2001 16:37:15 -0800
|
|
It sounds like all you have to do is modify the html that
produces the table. Make sure you're displaying all three
columns in your table, not just the one that sorts the
recordset. Your sql looks fine.
HTH,
Greg
> -----Original Message-----
> From: hoonboon69@h...
[mailto:hoonboon69@h...]
> Sent: Saturday, February 24, 2001 9:30 AM
> To: ASP Databases
> Subject: [asp_databases] only displaying one column of
table
>
>
> First...Thank you to everyone who has given me advice and
> help on other
> questions. Now....I am writing an ASP page that will
display
> all contents
> of a table. There are 3 different columns in my table.
Name, web, and
> category. depending on which of these is selected via a
drop
> down menu,
> everything will be displayed alphabetically. for
example...
> if the user
> selects CATEGORY from the drop down, they will see a list
of
> everything in
> the database sorted alphabetically by the CATEGORY name.
Same
> thing happens
> if they select NAME or WEB. My problem is that everything
> works but it only
> displays one category. The one that the user selects in
the
> drop down menu.
> It comes out alphabetical but it does not display the web
and
> the name
> category. My SQL statement looks like this....
>
>
> sql="SELECT Name, Category, Web FROM table ORDER BY " &
strInput
>
> strInput is the variable for the selection made in the
drop down menu.
>
> any help would be greatly appreciated.
|
|
 |