Re: mysqliconnect issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jun 16, 2008, at 10:49 PM, Chris wrote:

Jason Pruim wrote:
Okay, So I'm going to just assume that my issue is the fact that I'm
tired... and my mind won't work properly.

[Mon Jun 16 22:27:58 2008] [error] PHP Warning:  mysqli_connect()
expects parameter 5 to be long, string given

Now parameter 5 is the database name, I echoed out each of the
parameters and everything looks right...

here's the line that's causing the problem:

mysqli_connect($link, $server, $username, $password, $database)
or die('Connection failed in dbmysqliconnect.php');

No, #5 is the port number (http://www.php.net/mysqli_connect).

You want:

$link = mysqli_connect($server, $user, $pass, $dbname);

$link can't be passed to mysqli_connect because it doesn't exist yet ;)

Hey Chris,

Thanks for helping me through my brain shut down! Once I moved that it connects just fine. Now I just need to get the query to work. But that I am going to have to work on later as the day job doesn't pay me to work on side programming jobs ;)


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
japruim@xxxxxxxxxx




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux