Re: MySQL and loading infiles
| From: | Becoming Digital | Date: | Fri, 25 Apr 2003 02:47:33 +0000 |
| Subject: | Re: MySQL and loading infiles | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27346@lists.php.net to get a copy of this message | ||
Agreed. However, the open paren is missing from the first die() statement.
I'm sure it's just a typo (from the original post) but it could cause
further problems if cutting and pasting code.
Edward Dudlik
Becoming Digital
www.becomingdigital.com
----- Original Message -----
From: "mike karthauser" <mikek@brightstorm.co.uk>
To: "Gomez, Mark (PIRSA)" <gomez.mark@saugov.sa.gov.au>;
<php-db@lists.php.net>
Sent: Thursday, 24 April 2003 04:47
Subject: Re: [PHP-DB] MySQL and loading infiles
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
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php