If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Display 2 field of database in form <select>

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-18-04, 04:30
winterain winterain is offline
Registered User
 
Join Date: Oct 2003
Posts: 22
Display 2 field of database in form <select>

I have a database "code" with 2 field : "product_code" and "description".
product_code | description
PC | Personal Computer
MS | Mouse
etc

The form will let user choose a product code from this database. The query is like this :

java.sql.ResultSet rsproduct = statement10.executeQuery("SELECT * FROM code ORDER BY product_code");

At the form section,

<select name="product_code">
<option value=""></option>
<%
while(rsproduct.next()){
%>
<option value="<%=rsproduct.getString("product_code").trim ()%>"><%=rsproduct.getString("product_code")%></option>
<%}%>
</select>

How should I coding if wanna let user view the description for particular product_code while scroll down?

Thanks~~
Reply With Quote
  #2 (permalink)  
Old 03-18-04, 21:47
winterain winterain is offline
Registered User
 
Join Date: Oct 2003
Posts: 22
Can any code for "pop up" the different description while the mouse pointer is on the different product_code?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On