[ale] PHP Guru
Alex Carver
agcarver+ale at acarver.net
Thu Jan 31 20:09:04 EST 2013
On 1/31/2013 13:15, Chuck Payne wrote:
> Thanks that fixed it. Also, is the code for mysql different from
> mysqli? I was told I need to use that now.
>
The implementation of mysqli sucks goat balls. The regular mysql
library won't be going anytime soon because mysqli has a ton of bugs and
other compatibility issues. If you're worried about it you can make
abstraction functions that disguise the lower level DB actions and then
just fix the abstractions with whatever DB system is needed in the future.
Any of the programs I write that aren't more than a few dozen lines
usually implement a single included file that has all my data read/write
functions. The actual SQL and data massaging occurs within the
functions. Only cooked data (that which is not a raw dump of an SQL
query or insert/update) is passed into or out of the functions.
Also, good catch by David on the backticks, I forgot about those.
However, it would still not result in an easy to use array index because
the index would still have parentheses and commas in them. This is why
I always alias SQL function calls into human readable names if I plan to
address the result by name rather than by column number.
More information about the Ale
mailing list