On Mon, Jul 2, 2012 at 5:38 PM, Scott Baker <bak...@canbytel.com> wrote: > It was my mistake, and the SQL was easily fixed. But it woulda been nice > to have PHP realize there was a dupe when it was building that array to > return to me.
This is just not a province of PHP. What sort of behaviour would one expect PHP to do given this scenario? It is surely not an error in every case; I can see some code relying on this exact behaviour. Making it some sort of option in PHP increases the complexity a great deal, not only in trying to determine how to design and then *change* the API to accommodate it, but in figuring out what exactly one might *do*. Since SQL is a completely separate language from PHP, it makes much more sense to learn to deal with these thing separately, and understand what your SQL is doing. Indeed, SQL will happily return multiple columns with the same column name; you must be aware of this when writing it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php