mysql_fetch_array() error

Hello,
If anyone can help, I have the following error on my php code:
PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result.This is part of the PHP where the problem is and the message i get on the HTML page is something wrong in artistinfo table:

artistid is varchar(20) primary key in artistinfo table
song is varchar(20) from the same table

[COLOR=red] $query=“select MAX(artistid) as artistid from artistinfo”;
$result=mysql_query($query);
if($row=mysql_fetch_array($result))
{
$artistid = ++$row[“artistid”];
}
else
{
die(“something wrong in artistinfo table!”);
}[/COLOR]

Thank you for any response