Announcement

Collapse
No announcement yet.

What's the difference between MySQL and MySQLi?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • daemon
    replied
    Originally posted by Andy Huang View Post
    I thought *_fetch_array() does NOT associate, it was *_fetch_assoc() that does the association?
    The second argument of mysql_fetch_array() is an integer found in the constants MYSQL_ASSOC (fetch an associative array), MYSQL_NUM (standard array), and MYSQL_BOTH (the default). The same is true for mysqli_fetch_array() and the appropriately-named constants.
    Last edited by daemon; Fri 1st Jun '07, 9:45am.

    Leave a comment:


  • Wayne Luke
    replied
    Originally posted by daemon View Post
    So actually, for vBulletin, MySQL (not i) is faster. mysqli_stmt requires binding each column of the result to a separate variable manually (thus making it more of a pain and harder to abstract), as opposed to the standard *_query() and *_fetch_array() which returns an associative array.
    I actually meant to put MySQL. The other was a typo. I still personally feel that the benefits now and in the future outweigh the minor speed decrease. Each person will have to make that evaluation for themselves though.

    Leave a comment:


  • Andy Huang
    replied
    I thought *_fetch_array() does NOT associate, it was *_fetch_assoc() that does the association?

    Leave a comment:


  • daemon
    replied
    Originally posted by Wayne Luke View Post
    According to this: http://www.johnjawed.com/benchmarks/index.php

    MySQLi is faster.
    The conclusions the article draws are this:

    mysqli_stmt > mysql_query > mysqli_query > mysqli_multi_query
    So actually, for vBulletin, MySQL (not i) is faster. mysqli_stmt requires binding each column of the result to a separate variable manually (thus making it more of a pain and harder to abstract), as opposed to the standard *_query() and *_fetch_array() which returns an associative array.

    Leave a comment:


  • Wayne Luke
    replied
    According to this: http://www.johnjawed.com/benchmarks/index.php

    MySQL is faster.

    Leave a comment:


  • Chroder
    replied
    Does vB actually use any functionality from MySQLi? I read that using MySQLi for normal queries and such is much slower then using MySQL.

    Leave a comment:


  • Wayne Luke
    replied
    MySQLi is designed to work with MySQL 4.1.3 or higher and gives access to more advanced features in MySQL. It requires PHP 5.0 to use. It also gives you more control because you can change MySQL settings using MySQLi without stopping and starting the MYSQL server.

    The MYSQL connecting library is designed for older versions of MySQL.

    I use MySQLi on all my installations if it is present.

    Leave a comment:


  • Quillz
    started a topic What's the difference between MySQL and MySQLi?

    What's the difference between MySQL and MySQLi?

    I went ahead and installed a new copy of 3.6.7 to my localhost, which uses the latest versions of PHP and MySQL. Going through the config file, it recommended that MySQLi be used with the latest offerings from both. Anyway, I'm just wondering, what is the difference? Is MySQLi better in some ways?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X