开发者

How can I use mysqli->fetch_all if the PHP version at server is 5.2

I have developed a sample in latest PHP 5.3 and have realized it later that justhost开发者_如何学编程 dosn't support mysqlnd and PHP 5.3 so I have to change my db class method which are using mysqli->fetch_all() .

Does any one know a way to save this effort? Maybe another way arround by using a plugin or middle layer or some thing I can switch or test if mysqlnd is supported at the server or not ?


I would suggest going forward with a database layer like PDO or Zend_Db. Just choose one that you prefer.

Now as far as fixing all your existing code:

  1. Most IDE's have some sort of find replace function that can work over multiple files.
  2. If you are using OSX/Linux you may want to look at some command line tools like sed to replace the code in your existing files. Might be a bit of a learning curve on that though.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜