mysql & mysqliextensions

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
dibyendrah
Forum Contributor
Posts: 491
Joined: Wed Oct 19, 2005 5:14 am
Location: Nepal
Contact:

mysql & mysqliextensions

Post by dibyendrah »

Hi all,
I want to use mysqli extension using php5. currently i'm using mysql extension. Can I use both mysql and mysqli extension ?

Can I do like this ?

Code: Select all

// MySQL extension
extension=php_mysql.dll
// MySQLi extension
extension=php_mysqli.dll
Has anybody tested that ?


Dibyendra
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I have them both loaded.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I do too. And I might add that this could have been tried before it was asked.
User avatar
dibyendrah
Forum Contributor
Posts: 491
Joined: Wed Oct 19, 2005 5:14 am
Location: Nepal
Contact:

Post by dibyendrah »

thanks feyd ! I wish I could get an abstraction layer for both extensions so that I could only focus on other side of developement. Has anybody written that ? Please share of you have one .

Thanks
Dibyendra
User avatar
AKA Panama Jack
Forum Regular
Posts: 878
Joined: Mon Nov 14, 2005 4:21 pm

Re: mysql & mysqliextensions

Post by AKA Panama Jack »

dibyendrah wrote:Hi all,
I want to use mysqli extension using php5. currently i'm using mysql extension. Can I use both mysql and mysqli extension ?

Can I do like this ?

Code: Select all

// MySQL extension
extension=php_mysql.dll
// MySQLi extension
extension=php_mysqli.dll
Has anybody tested that ?


Dibyendra
Sure you can have both loaded. They each use a different function set. So you could have a connection to a mysql database using MySql functions AND a connection to a mysql database using MySqli functions at the same time. Though I wouldn't do it as that would really be a bad practice.

But there is nothing wrong with having both modules loaded. On my developement machine I have about a dozen different database extensions loaded for testing purposes and they don't clash with each other.
User avatar
dibyendrah
Forum Contributor
Posts: 491
Joined: Wed Oct 19, 2005 5:14 am
Location: Nepal
Contact:

Post by dibyendrah »

is there any mysqli abstraction layer written for php4/5 ? I also want to use that for testing purpose. Just interested using mysqli and if it's effective, I'll be using for real purpose.
User avatar
AKA Panama Jack
Forum Regular
Posts: 878
Joined: Mon Nov 14, 2005 4:21 pm

Post by AKA Panama Jack »

Well my ADOdb Lite supports MySqli as well as many other databases. :) The link is in the signature. :)

Hmmm, that reminds me I need to get the next version wrapped up and posted this weekend.
User avatar
dibyendrah
Forum Contributor
Posts: 491
Joined: Wed Oct 19, 2005 5:14 am
Location: Nepal
Contact:

Post by dibyendrah »

There are two versions of adodb and adodblite. Which one is better ? lite means for speed executiion or having less modules ?
I can use anyone of them but anyone having experience on both of them can write which one is better .

Thanks

Dibyendra
Post Reply