Re: Mysql statement works in phpmyadmin but not in php page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 12, 2010 at 09:44:47AM +1030, James McLean wrote:

> On Fri, Feb 12, 2010 at 9:31 AM, Joseph Thayne <webadmin@xxxxxxxxxxxxx> wrote:
> > As for the backticks, they are required because of MySQL, not because of
> > phpMyAdmin.  The issue was not that phpMyAdmin uses backticks, it is that
> > MySQL pretty much requires them when naming a field the same as an internal
> > function to my knowledge.  If someone else knows of another way to designate
> > to MySQL that a field named HOUR is the name of a field rather than the name
> > of the internal function, I would love to know.

Backticks are also required to preserve casing in MySQL, if you name
something in mixed or upper case; MySQL lowercases table and field names
otherwise. It's a silly misfeature of MySQL. 

I can't conceive of why a DBMS would assume something which should be
understood in the context of a field name should instead be interpreted
as a function call. Buy maybe that's just me.

Paul

-- 
Paul M. Foster

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux