Chroma doesn't like TonyG and chose my thread to bleat on about it. Move along...
Exit or die!
Miscellaneous Forums/General Discussion/Exit or die! i using never php for mass sql operations... ;)
Then why reply? o.O
Who said anything about 'mass sql operations'?
Who said anything about 'mass sql operations'?
Then why reply? o.O
He must be somehow related to tonyg. =x
Oh god..... whatever your gripe is with tonyg, get a room or sommat.
Anybody have any actual answer?
[edit] you know what? forget it.
I'll google til my fingers bleed if necessary. :/
Anybody have any actual answer?
[edit] you know what? forget it.
I'll google til my fingers bleed if necessary. :/
I personally prefer exit.
In my PHP book it uses die also. I would assume it stops php execution. There's a way to test it though. Put in a fake db name and have another php block below. Run it and if the bottom php runs then it doesn't stop php execution.
Die is used when you want to output error logs to web/files, useful for debug/error reporting.
Exit will stop current execution, and no further execution in current session.
I use die, actually you can use it to output log for you when something goes wrong...
Exit will stop current execution, and no further execution in current session.
I use die, actually you can use it to output log for you when something goes wrong...
another alternative is throw
<?php $msg = 'a messge'; throw new exception("aaaaargh!"); echo $msg; ?>
Chroma - why didn't you just post that in the first place instead of taking a cheap shot at somebody?
Yoko - thanks. Think I'm sorted now. =)
Yoko - thanks. Think I'm sorted now. =)
It was actually meant to be funny.