I'm new to the windows platform for php development and I have been having
problems with the or die function when running sql queries. It is being
called even when I run a valid query. I have tested it with valid queries
and it is always triggered. I have had to stop using it which is not good. I
n
t;, "sa") or die ("Could not
> connect");
>
> or die is an option of mysql_pconnect so you don´t need the {}.
>
> In the second example you can use {} for the if.
>
> []´s Waldemar
>
>
> - Original Message -
> From: "Raidell Avello"
inal Message -
From: "Raidell Avello" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 04, 2002 1:33 PM
Subject: [PHP-WIN] or die
> hi
> a have this code
> $link = mysql_pconnect ("localhost", "sa", "sa") {
> or die
hi
a have this code
$link = mysql_pconnect ("localhost", "sa", "sa") {
or die ("Could not connect");
}
and i receive
Parse error: parse error in c:\htdocs\otra.php on line 2
and rewrite the code like this
if (!$link = mysql_pconnect ("localhost", "sa", "sa")) {
echo "Could not