MySQL Forums
Forum List  »  Newbie

"Only variable references should be returned by reference" error
Posted by: Norman
Date: July 28, 2005 12:18PM

I am getting the following error msg.

Notice: Only variable references should be returned by reference in /home/storminca/www/cart-testing/library/database.php on line 9

from this code:

function &dbQuery($sql)
{
return mysql_query($sql);
}

and also from this code:

function &dbFetchAssoc($result)
{
return mysql_fetch_assoc($result);
}

Can someone explain why I'm getting this error and how I would go about correcting it? Thanks...

Options: ReplyQuote


Subject
Written By
Posted
"Only variable references should be returned by reference" error
July 28, 2005 12:18PM


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.