teknet
new to the springs Posts:5
|
07-14-2010 12:10 AM |
|
Hi
I want to have around 60 options for a drop down box , but dont want to enter them manually , how would i go about dumping them all in at once a SQL Query? as im a bit of a novice when it comes to SQL querys
Thanks |
|
|
|
|
Ryan Bakerink
river guide Posts:1900
|
07-14-2010 07:15 AM |
|
Hello Teknet,
You have a couple options in this case. But either way you will have to manually store your name value pairs.
First option:
1. You can add the name value pairs in your database manually and then use those to populate your drop down list. If you ever have a drop down list in the future that needs the same data you can just pull it in, instead of having to manually do it again.
Second option:
2. You can create a list in HOST -> Lists. You can enter the text and value of the fields you will add. This method is very similar to the first option. But you pull in the data from your list in a little different way then from the database(Different SQL Query). But same as option one, manual work is inevitable. But once you have your list you can use it in any form's drop down list.
If you have any questions please let me know.
Thanks,
Ryan |
|
|
|
|
teknet
new to the springs Posts:5
|
07-15-2010 02:13 AM |
|
Hi Thanks for the reply, in option one how would i retrieve the SOL query from the database so i can re enter the information again? Thanks |
|
|
|
|
Ryan Bakerink
river guide Posts:1900
|
07-15-2010 07:22 AM |
|
Hello Teknet,
I would recommend using option 2 in your case since you've mentioned you're new to SQL, if you were adding your values to your database directly(option 1) then it would require you to write SQL with your name value pairs.
If your using option 2 you wouldn't have to use SQL except when pulling in data from your list (HOST -> Lists). You wouldn't really need to create the query because when you choose SQL driven for the combo box, there is an example query which is exactly what you would use to get the data. The only modification would be using the name of your list instead of 'Regions'.
If you need any help or have any questions please feel free to ask.
Thanks,
Ryan |
|
|
|
|