Connecting Tech Pros Worldwide Help | Site Map

Which is the best function to exchange data with mysql?

  #1  
Old June 16th, 2009, 04:30 PM
mikek12004's Avatar
Familiar Sight
 
Join Date: Sep 2008
Location: Athens, Greece
Posts: 181
Until now I used mysql_ functions but recenlty heard something about mysqli_ functions which is supposed to be an improved versions of the previous and also saw an object oriented approached introduced in PHP 5, what's the best? Even if the object oriented approach is too complicated is it worth it to go at least to mysqli?
  #2  
Old June 16th, 2009, 08:53 PM
dlite922's Avatar
Expert
 
Join Date: Dec 2007
Location: Moon, Dark Side
Posts: 1,075

re: Which is the best function to exchange data with mysql?


OOP is another issue (search for OOP on bytes in the last few days, you'll get to know all about it, don't want to start another thread on OOP).

Yes mysqli or PDO functions are better than the normal mysql function.

You won't notice a difference if it's a small app. We like PDO because of it's fetchAll() function that mysql_*() do not have.

Good luck,



Dan
  #3  
Old June 16th, 2009, 09:23 PM
Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,862
Provided Answers: 9

re: Which is the best function to exchange data with mysql?


Quote:
Originally Posted by dlite922 View Post
OOP is another issue (search for OOP on bytes in the last few days, you'll get to know all about it, don't want to start another thread on OOP).

Yes mysqli or PDO functions are better than the normal mysql function.

You won't notice a difference if it's a small app. We like PDO because of it's fetchAll() function that mysql_*() do not have.

Good luck,



Dan
@OP: Note PDO is a library (also OO) - not native functions like mysqli_* and mysql_*.
  #4  
Old June 17th, 2009, 12:14 AM
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,487
Provided Answers: 9

re: Which is the best function to exchange data with mysql?


another note: MySQLi can be used as functions (like mysql_*) or as classes (like PDO)
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to encrypt javascript die roller output googlegroups@herbaloutfitters.com answers 12 July 3rd, 2006 03:45 PM