MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 8th, 2000, 11:25 AM
underdog underdog is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: British Columbia
Posts: 11 underdog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old March 24th, 2000, 12:18 PM
Erik Lindsley Erik Lindsley is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Posts: 6 Erik Lindsley User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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).]

Reply With Quote
  #3  
Old March 27th, 2000, 04:31 PM
underdog underdog is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: British Columbia
Posts: 11 underdog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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...

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > adding elements to SET datatype

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


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

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap