Penny for a FULL OUTER JOIN
October 9th, 2008I’m working with an ACL and I would kill for MySQL to support FULL OUTER JOIN. There are hacks to support something similar, but they would make my queries less pretty.
And pretty queries are important.
I’m working with an ACL and I would kill for MySQL to support FULL OUTER JOIN. There are hacks to support something similar, but they would make my queries less pretty.
And pretty queries are important.
I recently came across something of the form:
$allowed=array('foo','bar','baz');
foreach($stuff as $key => $value){
if( array_search( $key ,$allowed ) ){
What they meant was:
$allowed=array('foo','bar','baz');
foreach($stuff as $key => $value){
if( in_array( $key ,$allowed ) ){
I hate all the PHP array functions, partly because there are so many and I don’t recall many of them, and partly because that is the case with everyone else and they still use them. The first entry in the array will have a key of 0 which php will evaluate to false. Who really cares about foo anyways…
check.