Re: Re: [PHP] dumb mysql_connect issue

2001-07-31 Thread Data Driven Design

Is the error coming from a mysql_query() line or a mysql_select_db() line?

Data Driven Design
P.O. Box 1084
Holly Hill, Florida 32125-1084

http://www.datadrivendesign.com
http://www.rossidesigns.net
- Original Message -
From: CGI GUY <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 31, 2001 6:47 PM
Subject: Fwd: Re: [PHP] dumb mysql_connect issue


> Okay, well I used the mysql_error() print-out, and it
> returned something weird:
>
> " Access denied for user: 'username@hostname' to
> database 'tablename' "
>
> This is incongruous because:
>
> 1. The uid/password set I am using has full
> privileges.
> 2. *tablename* is not a database (the code I listed in
> my previous email is syntactically identical to the
> script)-- it's a table.
>
> Why is this happening to me?!?! ;)
>
> Note: forwarded message attached.
>
>
> __
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/






> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: Fwd: Re: [PHP] dumb mysql_connect issue

2001-07-31 Thread Alexander Wagner

CGI GUY wrote:
> " Access denied for user: 'username@hostname' to
> database 'tablename' "
>
> 1. The uid/password set I am using has full
> privileges.
> 2. *tablename* is not a database (the code I listed in
> my previous email is syntactically identical to the
> script)-- it's a table.
>
> Why is this happening to me?!?! ;)


FROM table_name.column_name
is interpreted as
FROM database.table_name

Hence the confusion of database and table-names.
"FROM table_name" will suffice.

regards
Wagner

-- 
Madness takes its toll. Please have exact change.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Fwd: Re: [PHP] dumb mysql_connect issue

2001-07-31 Thread CGI GUY

Okay, well I used the mysql_error() print-out, and it
returned something weird:

" Access denied for user: 'username@hostname' to
database 'tablename' "

This is incongruous because:

1. The uid/password set I am using has full
privileges.
2. *tablename* is not a database (the code I listed in
my previous email is syntactically identical to the
script)-- it's a table.

Why is this happening to me?!?! ;)

Note: forwarded message attached.


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/


or, echo $sql and copy/paste it into an sql client and see what it tells
you.

on 7/31/01 4:21 PM, Philip Olson at [EMAIL PROTECTED] wrote:

> Try putting mysql_error() in your die statements so :
> 
> or die(mysql_error());
> 
> and see what it tells you.
> 
> Regards,
> Philip
> 
> 
> On Tue, 31 Jul 2001, CGI GUY wrote:
> 
>> Is there anything (add. parameters, etc.) that I'm
>> missing that would possibly explain why the following
>> code won't execute?
>> 

 -- mike cullerton



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


Re: [PHP] dumb mysql_connect issue

2001-07-31 Thread mike cullerton

on 7/31/01 4:10 PM, CGI GUY at [EMAIL PROTECTED] wrote:

> Is there anything (add. parameters, etc.) that I'm
> missing that would possibly explain why the following
> code won't execute?



>in FROM table_name.column_name1,table_name.column_name2

table_name.column_name1 is a column, but "FROM" expects a table.

try "select table_name.column_name1,table_name.column_name2
 from table_name"

 -- mike cullerton



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] dumb mysql_connect issue

2001-07-31 Thread mike cullerton

or, echo $sql and copy/paste it into an sql client and see what it tells
you.

on 7/31/01 4:21 PM, Philip Olson at [EMAIL PROTECTED] wrote:

> Try putting mysql_error() in your die statements so :
> 
> or die(mysql_error());
> 
> and see what it tells you.
> 
> Regards,
> Philip
> 
> 
> On Tue, 31 Jul 2001, CGI GUY wrote:
> 
>> Is there anything (add. parameters, etc.) that I'm
>> missing that would possibly explain why the following
>> code won't execute?
>> 

 -- mike cullerton



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] dumb mysql_connect issue

2001-07-31 Thread Philip Olson

Try putting mysql_error() in your die statements so :

   or die(mysql_error());

and see what it tells you.

Regards,
Philip


On Tue, 31 Jul 2001, CGI GUY wrote:

> Is there anything (add. parameters, etc.) that I'm
> missing that would possibly explain why the following
> code won't execute?
> 
>  
> $connection =
> mysql_connect("hostname","username","password") or die
> ("Couldn't connect to server");
> 
> $db = mysql_select_db("database", $connection) or die
> ("Couldn't select database");
> 
> $sql = "SELECT * FROM table_name.column_name1,
> table_name.column_name2";
> 
> $sql_result = mysql_query($sql,$connection) or die
> ("Couldn't execute query");
> 
> ?>
> 
> Thanks in advance. This mailing list rules!!!
> 
> 
> __
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] dumb mysql_connect issue

2001-07-31 Thread Alexander Wagner

CGI GUY wrote:
> Is there anything (add. parameters, etc.) that I'm
> missing that would possibly explain why the following
> code won't execute?

What does it say? Any errors?
Are any of your messages printed?

regards
Wagner

-- 
Madness takes its toll. Please have exact change.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]