RE: [PHP-DB] Database abstract layer

2006-11-07 Thread Bastien Koert
element and combines it all into an html snippet that is then shown to the user. Bastien From: Vignesh M P N <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] Database abstract layer Date: Tue, 07 Nov 2006 15:19:26 -0600 Hi I am facing a common problem which any dev

Re: [PHP-DB] Database abstract layer

2006-11-07 Thread Natalie Leotta
We have 0/1/2 for gender but also have tlkpSex or something like that. It has the id and the string we want to use, then our queries just make sure that data.gender=tlkpSex.gender. Good luck! Natalie On 11/7/06, Tony Grimes <[EMAIL PROTECTED]> wrote: Why not build the options into your data

Re: [PHP-DB] Database abstract layer

2006-11-07 Thread Tony Grimes
Why not build the options into your data model? Instead of using integers for gender, use a varchar field that stores 'Male' and 'Female'. You can ensure data integrity by adding a check constraint to the column. If the presentation might change depending on context, you can create gender referenc

[PHP-DB] Database abstract layer

2006-11-07 Thread Vignesh M P N
Hi I am facing a common problem which any developer querying the database would face. In our web applications wherever we have more than one standard options for a field, we usually denote them as integers. Say, for gender, we store it as 1 or 2, but we display that as male or female in the