Re: MySQL and loading infiles
| From: | mike karthauser | Date: | Thu, 24 Apr 2003 08:47:23 +0000 |
| Subject: | Re: MySQL and loading infiles | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27327@lists.php.net to get a copy of this message | ||
on 24/4/03 4:41 am, Gomez, Mark (PIRSA) at gomez.mark@saugov.sa.gov.au
wrote:
> My pages currently connect using:
> $dbh =
> mysql_connect("host","database","user","password") or die
> mysql_error());
> $sdbh = mysql_select_db("database") or die (mysql_error());
Surely you should be doing:
$dbh = mysql_connect("host","user","password") or die
mysql_error());
$sdbh = mysql_select_db("database") or die (mysql_error());
As you connect to the server first and then select the db.
--
Mike Karthauser
Managing Director - Brightstorm Ltd
Email >> mikek@brightstorm.co.uk
Web >> http://www.brightstorm.co.uk
Tel >> 0117 9426653 (office)
07939 252144 (mobile)
Snailmail >> Unit 8, 14 King Square,
Bristol BS2 8JJ