Re: Re: PHP and MySQL bug
| From: | Michael J. Pawlowsky | Date: | Sat, 04 Jan 2003 18:21:39 +0000 |
| Subject: | Re: Re: PHP and MySQL bug | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-130241@lists.php.net to get a copy of this message | ||
Personally I say get yourself a good simple dbconnect class and make life easy.
Also if you ever change users, database name etc, you onlu have one place to replace it in your
code.
I wrote mine based on http://www.vtwebwizard.com/tutorials/mysql/
Take a look at it. Nice and simple.
Mike
*********** REPLY SEPARATOR ***********
On 04/01/2003 at 1:09 PM OrangeHairedBoy wrote:
>You really should be using a $link variable...it's good habit:
>
>$link = mysql_connect(...);
>mysql_select_db( "mydb" , $link);
>$query = mysql_query( "select..." , $link );
>$result = mysql_fetch_array($query);