[nycphp-talk] MySQL Monitor V PHP & MySQL
Michael Southwell
michael.southwell at nyphp.com
Fri Sep 21 19:41:29 EDT 2007
Quoting PaulCheung <paulcheung at tiscali.co.uk>:
> I have researched, checked and tried everything I can think of and
> still cannot get it to work.
> SELECT access_code FROM authorised_users WHEN
I am not familiar with WHEN but that could be my own ignorance
> $rs = @mysql_select_db( "test_db", $conn )
> or die( "Could not select database" );
>
> $rs = @mysql_select_db( "test_db", $conn ) or die( "Could not select
> database" );
This line is doubled but that is not your problem.
>
> $sql = "SELECT access_code
> FROM authorised_users
> user_id = '$userid' AND
This is the reason that you are getting different results: you left
out the WHEN that you had above (unless this is not an accurate
representation of your code); whether WHEN is a legitimate keyword is
a different issue.
--
Michael Southwell
Vice President, Education
NYPHP TRAINING http://nyphp.com/training/indepth
More information about the talk
mailing list