The first example fixed:
 $link = mysql_pconnect ("localhost", "sa", "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" <[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 ("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 connect";
>   }
> and work
> what's wrong???
> regards
> RAM
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to