954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

help with mysql and mysqli

hey there, i recently installed php5.0.2, apache2.0 and mysql4.1 independently but got them to work together. however i can only access a database when i type:

$db = new mysqli('localhost','username','password','database');


and yet when i try:

$db = mysql_connect('localhost','username','password');


it does not work, i have uncommented the extension in my php.ini and copied the appropriate files to my php directory. what could be the problem.please help me.thanks

realnsleo
Light Poster
46 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

I'm not expert on DB's but as far I know mysqli was designed to improve DB functionality. By the description which you gave it does look like your DB is set to use msqli and there for will not accept the other request. More info about mysqli setup, use and some exampes can be found here http://uk3.php.net/mysqli (also there is easier way to set DB+PHP+server look for XAMPP)

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You