Results 1 to 1 of 1
- 08-02-2007, 05:04 PM #1Member
- Join Date
- Aug 2007
- Rep Power
Displaying different columns with database query
I am going to explain what I want to do with an example.
Let's say that I have a table with the following columns: TYPE,NAME,LASTNAME,ADDRESS and also I have another table with: TYPE,COUNTRY,CAPITAL,POPULATION
I joined both tables, so the field (column) that let me distinguish between my two tables is TYPE (PERSONNEL & WORLD COUNTRIES)
I have created a Search Page, where users can select the table where they want look information. If they select PERSONNEL I only have to display the columns related with this table: NAME, LASTNAME, and if they select WORLD COUNTRIES, the results must display the columns COUNTRY,CAPITAL,POPULATION.
The table is in a database, I already did the query but I do not want to display all the columns that the table has. The columns that I should display in the result page are depending on usersí selection.
How can I do that with JSP?
- By anki1234 in forum JDBCReplies: 3Last Post: 08-20-2008, 05:45 PM
- By The Evil Genius in forum AWT / SwingReplies: 1Last Post: 03-17-2008, 02:01 AM
- By mano in forum New To JavaReplies: 0Last Post: 08-02-2007, 05:30 PM
- By Peter in forum JavaServer Faces (JSF)Replies: 2Last Post: 07-04-2007, 06:43 AM
- By Alan in forum AWT / SwingReplies: 2Last Post: 05-14-2007, 05:18 PM