0

One of my client project in PHP Old version (5.5) and used mysql_connect() and other function related on it so there are lot's of file has used PHP old version functions but now we want to migrate in new version 7.2 but old version's function of mysql is not working.

My question is not duplicate i have also referred in stack overflow but in my projects there are lot's of files that have been used old version function so how could i use same in new version.

Is there have any way to use same function in new PHP version ?

Samir Sheikh
  • 2,283
  • 2
  • 19
  • 37
  • you can use [`PDO`](https://secure.php.net/manual/en/book.pdo.php) instead, but don't try to use `mysql_*` functions anymore! You need to use `PDO` or `mysqli_*`. – Sebastian Brosch Aug 14 '18 at 06:52
  • So you mean to say i need to change in all files , it's around 100 – Samir Sheikh Aug 14 '18 at 06:56
  • Yes. The amount of files doesn't care in this case. You can use `mysqli_*` because it is nearly the same syntax compared to `mysql_*`. You should also use prepared statements. – Sebastian Brosch Aug 14 '18 at 06:58

1 Answers1

-1

Use their mysqli it will solve the problem..

mysqli_connect()
Raw Scripter
  • 113
  • 1
  • 12