[nycphp-talk] naming identifiers
Andy Dirnberger
dirn at dirnonline.com
Sun Aug 30 10:37:33 EDT 2009
> For instance, once the
> database reaches a certain size, you won't be able to back it up using
> phpMyAdmin, but will have to use the command line. That's sort of lame.
>
> At the bare minimum, if you're going to use phpMyAdmin to create
> tables, do it in raw SQL instead of using the widget.
I have to disagree with both of these statements. I don't know of any
size that phpMyAdmin can't handle. Most web servers aren't configured
to handle the amount of memory needed to export extra large databases.
It's Apache (nginx, IIS, lighttpd, et al) that can't handle the size.
And I use phpMyAdmin to create my tables all the time. If you are
afraid that you might use a reserved keyword for a field name, use the
` delimiters around the name of the field in your queries. I know
that I've used desc as a field name before (yes, I could be less lazy
and just type out description). I just make sure to escape it with `.
Most frameworks will automatically do this for you (for all field
names, not just reserved words). If you aren't using a framework,
there is no reason you can't do it yourself.
SELECT * FROM `table` WHERE `field` = 'value'
It may take a little getting used to, but it's a good habit to get into.
More information about the talk
mailing list