2

Why is it that PHP 7 has all mysql_ tags disabled by default.. it's such a pain to change everything.

Comments
  • 5
    Because you're supposed to be using mysqli_ now :p
  • 0
    @ScribeOfGoD you're suposed to use PDO now, you where suposed to jse mysqli since a long tkme ^^
  • 0
    @pascalwacker yeah, converting to PDO is annoying af
  • 0
    @Disreality it depends. For a new project just use something like Doctrine, that takes care about it. For a legacy project, I've once written a simple class with a constructor function, that takes a string (SQL query) as first argument and an optional array with the parameters. It took some work to replace all the calls but in the end I'd say worth the effort.
  • 0
    The effort is worth it.. but I still think mysql_ should've been kept.
  • 1
    @Disreality I disagre strongly. Justtake a look how many fucked up tutorials are out there teaching young devs to just take the variables from a GET request and pass it to mysql_ this creates an insecure web. (Don't get me started about file/image upload)
Add Comment