Re: something about the documentation
| From: | Rasmus Lerdorf | Date: | Mon, 13 Aug 2001 08:51:26 +0000 |
| Subject: | Re: something about the documentation | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62390@lists.php.net to get a copy of this message | ||
The $link argument is optional. If you don't specify one it will just use
the last one created.
-Rasmus
On Mon, 13 Aug 2001, Yamin Prabudy wrote:
> Hi there there is something missing in the documentation.....
> in this case is about mysql
> here is the source that i paste from the website
> --------------------------------------
> $link = mysql_connect("mysql_host", "mysql_login",
> "mysql_password")
> or die ("Could not connect");
> print ("Connected successfully");
> mysql_select_db ("my_database")
> or die ("Could not select database");
>
> $query = "SELECT * FROM my_table";
> $result = mysql_query ($query)
> or die ("Query failed");
> ---------------------------------------
>
> as i see the $link that do mysql_connect had been state but never been call in the progress
> such as mysql_select_db("my_database") [ sould be
> mysql_select_db("my_database",$link) ]
> so i assume that there wouldn't be any connection to mysql.....
>
> sorry if i'm wrong
> but for the newbies it's can be a miss guide
>
> Thanks in Advance
> Yamin Prabudy
>
>