thanks, now work
the problems is i copy this sample from distribution chm manual
i'll send a message inform that...

The whole sample is:
<?php
    $link = mysql_pconnect ("kron", "jutta", "geheim") {
        or die ("Could not connect");
    }

    mysql_select_db ("samp_db") {
        or die ("Could not select database");
    }

    $query = "SELECT last_name, first_name FROM friends";
    $result = mysql_query ($query) {
        or die ("Query failed");
    }

    # fetch rows in reverse order

    for ($i = mysql_num_rows ($result) - 1; $i >=0; $i--) {
        if (!mysql_data_seek ($result, $i)) {
            printf ("Cannot seek to row %d\n", $i);
            continue;
        }

        if(!($row = mysql_fetch_object ($result)))
            continue;

        printf ("%s %s<BR>\n", $row->last_name, $row->first_name);
    }

    mysql_free_result ($result);
?>

> 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


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

Reply via email to