Just a quick question. Say a call a method like so
mysql_pconnect("server","tator_w","password")
or die("Unable to connect to SQL server");
Can I have the 'die' call a method rather then display a text message? If so, how?
You would be better off using an if statement rather than relying on short-circuit evaluation if you want to do anything more complicated, e.g.:
if (!mysql_pconnect("server","tator_w","password")) {
call_a_function();
//some other stuff
die(); //if you still want to die
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With