|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Is there a way to retrieve the numerical value stored in a SET column rather than the string of elements the number refers to? I want to write a routine to be able to add an element _in the middle_ of a list of set elements. This means that I will have to do some bit-shifting so that elements later in the SET definition will still be flagged properly. I've written up a blurb I can e-mail anyone interested in SETs. I'm hoping someone might have some experience they'd care to share.
|
|
#2
|
|||
|
|||
|
Why would you want to do this?
The only reasons I can think of are: 1) Alphabetizing the list 2) Relying on the bit-positions for some binary code calls. My reply to the above would be: 1) Not worth the effort. Have the function which gets the list to begin with sort it. 2) Not portable between architectures ------------------ -Erik [This message has been edited by Erik Lindsley (edited March 24, 2000).] |
|
#3
|
|||
|
|||
|
I'm leaning towards `not worth it`. The idea was to use the memory economy of a SET (one or two bytes rather than one byte per character) while still allowing customization of the list by the user. Customization by alphabetization or whatever. The input would come from a group of checkboxes or a < select multiple> I do have sites where I a droplist is generated from a database table, and the user can add to and rearrange the order of items in the list. I'm trying to implement the same flexibility in displaying the output. Perhaps the way to go is the parse the output string and then arrange the bits...
|
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > adding elements to SET datatype |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|