On Tue, Mar 30, 2010 at 2:04 PM, Paul M Foster <paulf@xxxxxxxxxxxxxxxxx> wrote: > On Tue, Mar 30, 2010 at 01:36:27PM -0700, Tommy Pham wrote: > >> Hi, >> >> I'm just wondering if anyone on this list using some type of >> UID/UUID/GUID in any of the DB? If so, what DBMS/RDBMS are you using >> and how many rows do you have for the table(s) using it? What data >> type are you using for that column? > > If I understand you correctly, I use a single table, "users". Either > MySQL or PostgreSQL (depending on the application). There is one record > per user, and that record contains a serial/sequential ID, set by the > system, a user ID which is varchar(8), email address which is > varchar(255), username which is varchar(50) and a password which is > varchar(32) and stored encrypted. > Hi Paul, In the case of mysql, it would be UUID and the value would look like this: 22ea1df1-3c40-11df-ab7a-200cd91e08cf and the case of postgresql, A0EEBC99-9C0B-4EF8-BB6D-6BB9BD380A11 {a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11} a0eebc999c0b4ef8bb6d6bb9bd380a11 which is 36 CHAR length (including dashes not braces) and is not quite like identity insert (autoincrement). You could store it as binary(16) - in mysql - but you'll need to implement UDFs to convert between binary & char. Is that what you're using? or Are you using an INT type? Regards, Tommy > There are other related tables I use to record which URLs require > security and which users have access to those URLs. > > Paul > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php