NYCPHP Meetup

NYPHP.org

[nycphp-talk] naming identifiers

lists at nopersonal.info lists at nopersonal.info
Mon Aug 31 10:05:26 EDT 2009


Kristina D. H. Anderson wrote:
>  
> ...and also to never use just "id" for the primary key field name.
> 

Hi Kristina,

I'm probably going OT when I shouldn't, but I'm so glad you mentioned
that because I was just wondering about it yesterday. I started out
using "id" because it was easy when I needed to use PHP to delete
records form different tables and such, but then sometimes it got
confusing so I started using names like "prod_id".

Besides what I discovered on my own, are there other reasons it's
considered bad practice? I'm very interested in knowing.

Bev




More information about the talk mailing list