NYCPHP Meetup

NYPHP.org

[nycphp-talk] Bizarro Bug -- AHA!!!!!!!

David Krings ramons at gmx.net
Wed Apr 2 11:54:04 EDT 2008


Kristina Anderson wrote:
> What were we saying about how sometimes when we post to the list, we 
> see what the problem is??????
> 
> In this case the problem is that I'm a MORON!!! I was calling $query1 
> twice instead of calling $query2 in the second case....!!!
> 
> $result2 = mysql_query($query1)
> 
> {this is not the first time it took me hours to figure out that I was 
> doing this....!!!  Hopefully the last time.)
> 

Shows that using more descriptive variable names is a good idea, but since you 
inherited that code that advice goes to the other guy I guess.
I'm often overly verbose in my variable naming, but thankfully there is 
autocompleted in PHPEd. :)

David



More information about the talk mailing list