Jump to content

ereg_replace issue


buzzby

Recommended Posts

hi there people

 

i have this code happening with regards to my wamp server. is this something that can be sorted out? would this happen on a normal remote server that has lamp on with the necessary bells and whistles?

Deprecated: Function ereg_replace() is deprecated in C:\wamp\www\itinwales\common\classes\class.paging.php on line 22

 

this is the code on line 22

 

$query = ereg_replace("^SELECT[[:space:]+]","SELECT SQL_CALC_FOUND_ROWS ",$query);

 

i have not come across coding like this before. is there a way that this can be written to work better or just to atually work?

 

cheers

Link to comment
https://forums.phpfreaks.com/topic/180872-ereg_replace-issue/
Share on other sites

hi there

 

i have tried using the code instead

 

$query = "SELECT ";
$query = preg_replace("/^SELECT +/i","$0 SQL_CALC_FOUND_ROWS ",$query);
echo $query;

 

but it brought up more errors.

 

i am using 5.0.4 on the remote server and 5.3.0 on my wamp server. what is the best php version to use? (5.2.11?)

 

hi there

 

also this "SQL_CALC_FOUND_ROWS" is this a command of some sort? i have not seen this before. i am trying to trawl thru another persons php shop. i downloaded the whole shop from one server and trying to put it up on another server. this is one of the 5 errors i am coming up against. anyone had any experience with this?

Link to comment
https://forums.phpfreaks.com/topic/180872-ereg_replace-issue/#findComment-954737
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.