NYCPHP Meetup

NYPHP.org

[nycphp-talk] MySQL Monitor V PHP & MySQL

PaulCheung paulcheung at tiscali.co.uk
Sat Sep 22 11:52:59 EDT 2007


Hi Ken,

The $access_code = $access_code - $access_code; is just an prehistoric 
programming technique.

By the way the solution you proposed did not work; But the access_code is 
now blank I would be most grateful for any other suggestions.

ser id = Nancy
password = qwerty
account = 48572998
self = /tp_orth.php
conn = Resource id #2
sql = SELECT access_code FROM authorised_users WHERE user_id = 'Nancy' AND 
user_password = 'qwerty' AND account = '48572998'
Welcome - your log-in succeeded!
access_code =
$access_code =

Paul
----- Original Message ----- 
From: "Kenneth Dombrowski" <kenneth at ylayali.net>
To: <talk at lists.nyphp.org>
Sent: Friday, September 21, 2007 9:03 PM
Subject: Re: [nycphp-talk] MySQL Monitor V PHP & MySQL


>
> 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']
>
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php 



More information about the talk mailing list