Re: PHP and MySQL SELECT COUNT (*)

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

 



Dan Joseph schreef:
On Wed, Sep 17, 2008 at 2:17 PM, Vinny Gullotta <vgullotta@xxxxxxxxxxxxxx>wrote:

...


$i[servername]

Try:  $i['servername']

notice the ' and ' around the name.  I've heard you can do w/o those, but
I've had issues in the past where it didn't work.  ITs also good practice to
use 'em.

yes, not quoting the array key will generate an E_NOTICE, php first looks for
a constant named **servername** doesn't find it and falls back to using the
literal as a string value, namely 'servername'

developed with error_reporting set to E_ALL and such things are explained to you.




--
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