views:

47

answers:

3

Hi

mysql_connect is not working but mysql_iconnect is working.

Please help.

Thanks

A: 

It's a typo - The function you're looking for is mysqli_connect(), not mysql_iconnect.

Spudley
Well, that's the one that's working....
Pekka
heh. well, that makes it even more surprising it's working ;)
Spudley
+1  A: 
$con = @mysql_connect("hostname","user name","password") or die(mysql_error());
@mysql_select_db("databasename") or die(mysql_error());  

try this

KMK
A: 

I presume you are talking about using PHP here correct?

The mysql_connect() and mysqli_connect() functions are provided by different add on modules to php. Is it possible you have one but not the other installed? Why do you need one over the other? Does mysql_pconnect() work? What errors do you get with mysql_connect()?

Caleb