MySQL Forums
Forum List  »  PHP

Re: Fatal error: Call to undefined function mysql_connect()
Posted by: Peter Brawley
Date: June 25, 2006 03:06PM

I'm having trouble following your sequence of error messages, so I will ignore all the previous ones for now, and just concentrate on your current post.

You say ...

$connect = mysqli_connect($host,$user,$password);

is failing. But there is no indication of this. The call should have an error-trap call to mysqli_error().

Having connected via mysqli_connect(), you need mysqli_query(), NOT mysql_query():

$result = mysqli_query( $connect, $sql ); // $sql IS 2ND PARAM
if( $result == FALSE ) // NOT 0
... &c ...

PB

Options: ReplyQuote


Subject
Written By
Posted
Re: Fatal error: Call to undefined function mysql_connect()
June 25, 2006 03:06PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.