View Single Post
08-17-2012, 08:49 PM
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
Posts: 6,893
iTrader: 18 / 100%

Village Genius will become famous soon enough


I don't think there is a direct conversion because mysql queries from the depreciated library are built as a string then sent while mysqli uses parameters. Parameters send the variables at a later time than the query, so your queries might look like

"SELECT something FROM a_database WHERE something=? and something_else=?"

You'd send that to the database then tell it to bind those two variables before you actually execute it. This makes SQL injection literally impossible and is a lot faster. If you are just building a query like you would have before you may as well not convert.