Random coding fact of the day
Sep. 7th, 2005 12:50 pmOne thing I love about php is the ability to go:
$result = mysql_query($query) or die();
The "or" syntax just means, "if this operation returns false, perform this other action" - used mostly for error reporting or whatever. The "die" function stops processing the page (and, yes, there's usually some useful error message inside those brackets but for the purposes of this post that's not important).
I just really enjoy telling a page to commit seppuku if it fails in its duties.
$result = mysql_query($query) or die();
The "or" syntax just means, "if this operation returns false, perform this other action" - used mostly for error reporting or whatever. The "die" function stops processing the page (and, yes, there's usually some useful error message inside those brackets but for the purposes of this post that's not important).
I just really enjoy telling a page to commit seppuku if it fails in its duties.
no subject
Date: 2005-09-07 02:02 pm (UTC)no subject
Date: 2005-09-07 02:08 pm (UTC)no subject
Date: 2005-09-07 02:34 pm (UTC)no subject
Date: 2005-09-07 02:38 pm (UTC)PHP stands for PHP Hypertext Processor?
So what does the first PHP stand for?
no subject
Date: 2005-09-07 02:40 pm (UTC)Of course, really it's just because geeks think recursive acronyms are clever. like GNU stands for "GNU's Not Unix".
I roll my eyes.
no subject
Date: 2005-09-07 03:00 pm (UTC)*see recursive
no subject
Date: 2005-09-07 03:02 pm (UTC)no subject
Date: 2005-09-07 04:07 pm (UTC)no subject
Date: 2005-09-07 02:37 pm (UTC)no subject
Date: 2005-09-07 03:00 pm (UTC)no subject
Date: 2005-09-07 06:31 pm (UTC)no subject
Date: 2005-09-07 10:42 pm (UTC)no subject
Date: 2005-09-09 04:20 pm (UTC)