Hello
Does anyone know if there is a difference between this codes, php uses both to connect to the mysql database.

$session = mysql_connect ("localhost", "username", "password");

and

@ $session = mysql_pconnect "localhost", "username", 
                     "password");

what does the @ sign do and why mysql_pconnect and not mysql_connect?

    Actually, the @ operator can be used for both.
    I would use:

    $session = @mysql_connect(<parameters>);

    and for debugging:

    $session = mysql_connect(<parameters>)
    OR die(mysql_error());

    If I'm not wrong, using the @ operator on the variable should be somewhat incorrect use, since it suppresses errors from the variable not the function.
    Never really tested though.

      Write a Reply...