NYCPHP Meetup

NYPHP.org

[nycphp-talk] MySQL Monitor V PHP & MySQL

PaulCheung paulcheung at tiscali.co.uk
Mon Oct 1 09:33:28 EDT 2007


Hi Michael,

I have taken onboard all the comments and research things further and was
eventual able to force an error message
Warning: mysql_query() [function.mysql-query]: Access denied for user
'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\tp_test.php on
line 38
Armed with this info I changed the PHP.INI and used
grant all privileges on *.* to ODBC at localhost identified by enter with grant 
option;
both with and without the password and still I cannot move ahead.

The error message is a "mysql error 1045". There appears to be one PHP rule 
for Linux and another for Windows.
Apart from the obvious of moving from Windows to Linux  does anybody have 
any ideas or suggestion that will help me overcome
this problem. From what I have read on the MySQL website there does not 
appear to be any help there
as what I am trying to accomplish works in MySQL command mode. It only falls 
over, for me anyway, when trying the same thing using PHP & MySQL.







---- Original Message ----- 
From: "Michael Southwell" <michael.southwell at nyphp.com>
To: <talk at lists.nyphp.org>
Sent: Saturday, September 22, 2007 12:41 AM
Subject: Re: [nycphp-talk] MySQL Monitor V PHP & MySQL


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