[PHP-DB] Incrementing Primary Key

2010-10-27 Thread Ethan Rosenberg
Dear List - Thanks for all your excellent help. I am setting up a database for medical research, which will be conducted at various sites. The sites will be identified by a letter {A,B,C }. The medical record number [primary key] will start at 1001 and increment by one(1) for each

RE: [PHP-DB] Incrementing Primary Key

2010-10-27 Thread Jimmy Sole
I think having a table for each site would be sufficent -Original Message- From: Ethan Rosenberg [mailto:eth...@earthlink.net] Sent: Wednesday, October 27, 2010 9:11 AM To: php-db-lists.php.net Subject: [PHP-DB] Incrementing Primary Key Dear List - Thanks for all your excellent help.

RE: [PHP-DB] Incrementing Primary Key

2010-10-27 Thread Jimmy Sole
Just set the primary key to AUTO_INCREMENT on each field and you won't have to worry about it -Original Message- From: Ethan Rosenberg [mailto:eth...@earthlink.net] Sent: Wednesday, October 27, 2010 9:11 AM To: php-db-lists.php.net Subject: [PHP-DB] Incrementing Primary Key Dear List -

Re: [PHP-DB] Incrementing Primary Key

2010-10-27 Thread Andrés G . Montañez
Hi Ethan, in this case, you should manage the keys by your application, and store the used ids in aonther table, similar to a sequence in Oracle or Postgresql. Thats so if you want all the records un one table (a field for the letter, and the other for the numeric part). Otherwise, having a table

RE: [PHP-DB] Incrementing Primary Key

2010-10-27 Thread Jimmy Sole
In my opinion, having a database for each site would require a lot of unnecessary work, as you would have to connect to every database in order to handle the sites. Having one database with tables for all the sites would be more productive as you would not have to change the connection info for

Re: [PHP-DB] Incrementing Primary Key

2010-10-27 Thread Max E.K
Hi Ethan, I am working currently as clinical developer and have developed multi site databases for clinical trials. I would say the approach you take will depend on number of factors. How is the site connectivity? I had a scenario where sites had erratic and slow connectivity so i had to

Re: [PHP-DB] Incrementing Primary Key

2010-10-27 Thread Andrés G . Montañez
Yes indeed, as Jimmy says, having a database for each site is impractical and a waste of resources. On 27 October 2010 11:23, Jimmy Sole jimmys...@gmail.com wrote: In my opinion, having a database for each site would require a lot of unnecessary work, as you would have to connect to every

Re: [PHP-DB] Incrementing Primary Key

2010-10-27 Thread Richard Quadling
On 27 October 2010 14:11, Ethan Rosenberg eth...@earthlink.net wrote: Dear List - Thanks for all your excellent help. I am setting up a database for medical research, which will be conducted at various sites.  The sites will be identified by a letter {A,B,C }.  The medical record number

Re: [PHP-DB] Incrementing Primary Key

2010-10-27 Thread Max E.K
- Original Message - From: Richard Quadling rquadl...@gmail.com To: Ethan Rosenberg eth...@earthlink.net Cc: php-db-lists.php.net php-db@lists.php.net Sent: Wednesday, October 27, 2010 4:10:52 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: Re: [PHP-DB]

[PHP-DB] Books

2010-10-27 Thread Ethan Rosenberg
Dear List - Is anybody aware of any books on PROCEDURAL PHP programming, NOT OO. Thanks. Ethan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Books

2010-10-27 Thread Bastien
On 2010-10-27, at 8:20 PM, Ethan Rosenberg eth...@earthlink.net wrote: Dear List - Is anybody aware of any books on PROCEDURAL PHP programming, NOT OO. Thanks. Ethan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Php

Re: [PHP-DB] Incrementing Primary Key

2010-10-27 Thread Ethan Rosenberg
At 10:10 AM 10/27/2010, Richard Quadling wrote: On 27 October 2010 14:11, Ethan Rosenberg eth...@earthlink.net wrote: Dear List - Thanks for all your excellent help. I am setting up a database for medical research, which will be conducted at various sites. Â The sites will be identified