Page 1 of 1
					
				PHP MySQL to MySQli
				Posted: Mon Jan 20, 2014 6:39 pm
				by Zester
				I stated to write my code using MySQL, But I should of used MySQLi as it is better.
Is MySQLi that much Better then MySQL?
How Hard is it to change the code over to MySQLi, is it worth the time?
If so what is the Best way to do it?
Cheers
			 
			
					
				Re: PHP MySQL to MySQli
				Posted: Mon Jan 20, 2014 6:57 pm
				by a_bertrand
				It is MUCH better if you use prepared statements and bind variables. If you pass values within the SQL statement it's as bad as MySQL.
Best way? Create yourself a lib or use something done by somebody else.
			 
			
					
				Re: PHP MySQL to MySQli
				Posted: Mon Jan 20, 2014 6:58 pm
				by Jackolantern
				Because the standard mysql package has been deprecated, it should no longer be used. It could be removed from a later version of PHP, leaving you with no upgrade path without rewriting your code to use at least mysqli. It is also slower and less secure than mysqli. 
Of course, most serious PHP work done today uses 
PDO at its core, and typically uses some kind of ORM for the actual data access.