How to stop error reporting

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bonecone
Forum Newbie
Posts: 3
Joined: Wed Aug 19, 2009 1:16 pm

How to stop error reporting

Post by bonecone »

This segment of code is causing me problems:

$q = mysql_query("select * from `calendar` where `month` = '".$this->month."' and `year` = '".$this->year."' order by `day` asc");

It generates the errors

Deprecated: Assigning the return value of new by reference is deprecated in /home/exp/public_html/inc/quick_calendar.inc.php on line 413

Deprecated: Assigning the return value of new by reference is deprecated in /home/exp/public_html/inc/quick_calendar.inc.php on line 414


I tried turning it off by placing at the top of the page:
error_reporting('E_ALL ~E_DEPRICATED');

but it doesn't have any effect. Is there some way I can change the mysql_query statement in order to stop these errors from appearing?
User avatar
markusn00b
Forum Contributor
Posts: 298
Joined: Sat Oct 20, 2007 2:16 pm
Location: York, England

Re: How to stop error reporting

Post by markusn00b »

The query isn't the problem. Sounds like you're doing something like $x =& new something.
Post Reply