Discussion Forums  >  Self Hosted Control Panels

Replies: 4    Views: 94

teqbean
Code is Art
Profile
Posts: 119
Reg: Jan 01, 2012
Atlanta, GA
3,340
01/18/13 09:01 PM (13 years ago)

GUIDs in the database

Do the GUIDs in the database need to stay as HEX based characters or can I create my own with letters outside of the hex range?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/18/13 09:20 PM (13 years ago)
Well, you probably shouldn't listen to me, lol! 'The way I understand it' is that 'most' GUID's are unique values that are generated so that they do not conflict with other GUID values. 'providing' that 'your' self generated GUID is unique and doesn't conflict with others, you're good to go. I've used a dynamic database record number to assist in my GUID generation, where my php script was similar to: $poi["itemType"] = "BT_menuItem"; $poi["itemId"] = $row["recnum"]; thus the json output (for instance) would be .... "itemType":"BT_menuItem", "itemID":"3" ... and as long as I have no items that whose itemID is merely "3", I'm good. Keep in mind that 'some' GUIDs are referenced by other items. Make sure you don't change anything critical. I usually 'create' my own for my own screens, not BT generated. Does this help? Cheers! -- Smug
 
teqbean
Code is Art
Profile
Posts: 119
Reg: Jan 01, 2012
Atlanta, GA
3,340
like
01/18/13 09:26 PM (13 years ago)
Yes, thank you. It is what I thought. I also create my own usually but I have an older app with 500 screens and I am trying to duplicate it by duplicating records in the DB but changing the GUIDs of course to not conflict with the old app.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
01/18/13 09:42 PM (13 years ago)
I use a combination of a word identifier and a number. For instance, I might have a menu item with a child id of "phone1" that points to a screen with an id of "phone2". That way I can easily look at my json and know what I'm looking at, but also ensure that I have unique identifiers.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/18/13 09:42 PM (13 years ago)
Gotcha... Keeping them discrete should be safe. Good luck! Thats a lot of screens! Cheers! -- Smug
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.