For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > May 2007 > Re: [PHP-DB] mysqli_select_db() expects exactly 2 parameters, 1 given









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] mysqli_select_db() expects exactly 2 parameters, 1 given
David Weitz

2007-05-25, 6:58 pm

mysqli_select_db requires the connection to be in the first argument. So:
$link = mysqli_connect('blah','blah','blah');
$db = mysqli_select_db($link,$db_name);

James Lockie wrote:
> I do: $db = mysqli_select_db( $database_name );
> I get this error: HP Warning: mysqli_select_db() expects exactly 2
> parameters, 1 given
>
> I have MySQL server version: 4.1.22 and PHP 5.2.2.
>

James Lockie

2007-05-25, 6:58 pm

David Weitz wrote:
> mysqli_select_db requires the connection to be in the first argument. So:
> $link = mysqli_connect('blah','blah','blah');
> $db = mysqli_select_db($link,$db_name);
>
> James Lockie wrote:
>

It is not plugin compatible with the mysql_ calls. :-(
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com