[nycphp-talk] Bizarro Bug -- AHA!!!!!!!
Kristina Anderson
ka at kacomputerconsulting.com
Wed Apr 2 11:54:41 EDT 2008
Dan,
I will definitely take your advice on this! Thanks!
Clearly the standard "or die" error handling isn't effective in cases
where the syntax is correct, but the wrong query is being called in the
code...especially in these cases where the queries are identical except
for one variable value! -- logging which query is being called could
save me hours of fun trying to overcome my own boneheadedness.
> On Wed, Apr 02, 2008 at 08:35:52AM -0700, 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)
>
> Glad you figured it out.
>
> Let me emphasize what was said in my prior email:
>
> You need to use your own function for running the SQL rather than
calling
> mysql_query() directly throughout the code. Then your central
function
> can have a logging/debugging option.
>
> --Dan
>
> --
> T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
> data intensive web and database programming
> http://www.AnalysisAndSolutions.com/
> 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
More information about the talk
mailing list