Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 06-01-2010, 01:52 PM MySQLi or MySQL
Red_X_'s Avatar
Extreme Talker

Posts: 158
Location: Houston
Trades: 0
So to get right to the point of this. What are the real differances between the two? I've read around that MySQLi(mysqli_connect) is more secure but slower, where as MySQL(mysql_connect) is less secure but faster.

But I am more or less curious about this. Should I switch to MySQLi? And if so, why?
__________________
"Good News Everyone, by reading this your hearing my voice."
Red_X_ is offline
Reply With Quote
View Public Profile Visit Red_X_'s homepage!
 
 
Register now for full access!
Old 06-01-2010, 01:57 PM Re: MySQLi or MySQL
vectorialpx's Avatar
Extreme Talker

Posts: 249
Name: octavian
Location: Bucharest
Trades: 0
mysqli_connect is accesing a class, a constructor and some resources. This makes it more secure (it has some security improuvements) but slower (it has to access some functions, to get you the real mysql connection)

mysql_connect it's a core function and it's just that. It's faster because it's accessed whithin PHP itself and that's it. It's "not so secure", because you just open the connection.

I use mysql_connect because if you have a well done site, it's hard to take advantage of mysql_connect security "issues". In fact, it's all about your code, and all about your thinking
__________________
you can
Please login or register to view this content. Registration is FREE
vectorialpx is offline
Reply With Quote
View Public Profile Visit vectorialpx's homepage!
 
Old 06-03-2010, 09:14 PM Re: MySQLi or MySQL
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
I've never looked at the difference in terms of security, but functionality. MySQLi allows you access to features of MySQL 4.1+ which are not able to be taken advantage of via the mysql_ functions. If your knowledge of MySQL is sufficient and you want the added performance of more-optimized queries, then MySQLi is the only way to go (when compared to mysql_ ).
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Reply     « Reply to MySQLi or MySQL
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11617 seconds with 12 queries