NYCPHP Meetup

NYPHP.org

[nycphp-talk] MySQL Monitor V PHP & MySQL

Kenneth Dombrowski kenneth at ylayali.net
Fri Sep 21 16:03:35 EDT 2007


Hi Paul, 

On 07-09-21 20:47 +0100, PaulCheung wrote:
> $access_code = $access_code - $access_code;

i don't understand what your intent is with the above line.. setting
$access_code to 0?  (it's not your problem, i am just curious) 

> $rs = mysql_query( $sql, $conn )  or die( "Could not execute query" );
> 
> $num = mysql_numrows( $rs );
> 
> if( $num != 0 )
> { $access_code = access_code;

the above line looks to me like $access_code is being assigned the value
of the undefined constant access_code, which php will assume is intended
to be the string 'access_code' 

i think you want $access_code = $rs['access_code'] 





More information about the talk mailing list