MySQL Forums
Forum List  »  Newbie

Ambiguous error message
Posted by: Shantanu Oak
Date: July 23, 2005 08:12AM

Hi,

// If the connection fails...
$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");

// If select database fails...
mysql_select_db($db) or die ("Unable to select database!");

So far so good.
But what happens if the query fails because the user does not have read access to the table?

$query = "select concat('<a href=\"',Website,'\">', Website, '</a>'), Explanation from favorites where Catgegory='CSS'";

$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());
_____

Error in query: select concat('', Website, ''), Explanation from favorites where Catgegory='CSS'. Unknown MySQL error

I was expecting more user friendly error message here.
I would be happy if MySQL complained about user permissions.

Shantanu Oak

Options: ReplyQuote


Subject
Written By
Posted
Ambiguous error message
July 23, 2005 08:12AM
July 23, 2005 09:02AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.