dbTalk Databases Forums  

select help

mailing.database.myodbc mailing.database.myodbc


Discuss select help in the mailing.database.myodbc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dan Cox
 
Posts: n/a

Default select help - 07-06-2003 , 01:39 PM






Hello list,
I'm really new to mysql and databases in general. I have a select form
that contains a very long list of options, and what I want to do is
store the selected item as a number instead of the items name in order
to speed up searches. My problem comes when a search is done and I can't
figure out how to return the query with the items name not the number.
Any suggestions and help is greatly appreciated.

Dan Cox


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=m...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
Todd O'Bryan
 
Posts: n/a

Default Re: select help - 07-06-2003 , 01:45 PM






I'm new, too, so someone correct me if I'm wrong, but...

if you make it an ENUM field in a table you can store it using the
value in the selection, retrieve it as the same value, and still get
all the advantages of numeric storage.

Todd

On Sunday, July 6, 2003, at 02:38 PM, Dan Cox wrote:

Quote:
Hello list,
I'm really new to mysql and databases in general. I have a select form
that contains a very long list of options, and what I want to do is
store the selected item as a number instead of the items name in order
to speed up searches. My problem comes when a search is done and I
can't
figure out how to return the query with the items name not the number.
Any suggestions and help is greatly appreciated.

Dan Cox


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=t... mac (DOT) com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=m...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
mtoth
 
Posts: n/a

Default Re: select help - 07-06-2003 , 02:54 PM



Another option is to have another table with the item name and number
using that as a lookup table.

IMHO it all depends on the data if the select is static (or rarely
changes) an enum would be best. If is changes a lot then I would use
another table to store it in.


-Michael

"I protectssss you, skin brother." -mriswith

On Sun, 6 Jul 2003, Todd O'Bryan wrote:

Quote:
I'm new, too, so someone correct me if I'm wrong, but...

if you make it an ENUM field in a table you can store it using the
value in the selection, retrieve it as the same value, and still get
all the advantages of numeric storage.

Todd

On Sunday, July 6, 2003, at 02:38 PM, Dan Cox wrote:

Hello list,
I'm really new to mysql and databases in general. I have a select form
that contains a very long list of options, and what I want to do is
store the selected item as a number instead of the items name in order
to speed up searches. My problem comes when a search is done and I
can't
figure out how to return the query with the items name not the number.
Any suggestions and help is greatly appreciated.

Dan Cox


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=t... mac (DOT) com



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=m...ldor (DOT) com



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=m...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.