Get the "die" statement off, and check if your query succeeds, if no, let
rest of script go ahead :
$db = @mysql_pconnect (....);
$query = """;
// here goes the rest
De: Chris Vargas <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: sexta-feira, 16 de março de 2001 22:12
Assunto: [PHP-DB] Help with displaying rest of page after MySQL error
> This has to be a basic question but I can't find it
> answered anywhere; I'm probably not searching for the
> right words or something.
> I have a page that inserts some MySQL search results
> in the middle of the page. My web hosting provider's
> MySQL uptime is spotty. I'd like the rest of the page
> to load if any of the calls to the database fails.
> My first line of PHP code (embedded in HTML) has:
> $db = mysql_connect("x","y","z") or
> If I have a connection problem, it does print the
> "die" message and the connection error, but it also
> stops the page right there: no more HTML is displayed.
> I know about suppressing the error message with "@"
> but this wouldn't seem to help this problem.
> Do I need something to exit the embedded PHP and
> continue on with the following HTML if $db ==
> "" ?
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]