From: Neil Y. <ny...@as...> - 2008-03-31 20:29:49
|
Oops, I mean move lines like this under the if statements.: $result_<whatever>=mysql_query($query_<whatever>) or die(mysql_error()); Neil Neil Young wrote: > The database is being updated as soon as the code hits the mysql_query > statement, not when you call the result (i.e. $result_ReportNewDiversion > on a line by itself), which doesn't do anything. Move the lines with > $result_<whatever> into the if statement and I think you'll get the > result you are looking for. > > Neil > > > Roderick Thomas wrote: > >> Please examine my attached script. I don't understand what I'm doing >> wrong with my "if" statements. I'm thinking my unique conditions >> should only report to either the "diversionlog" table or the >> "othercrimes" table. Additionally, only one post should be made to >> the "changelog" table. >> >> Instead, the a post is being made to both the "diversionlog" and the >> "othercrimes" tables and double posts are being made to the >> "changelog" table. >> >> This is odd to me because the conditions don't seem to overlap and all >> of the variables are printing as I expect them to. >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> chiPHPug-discuss mailing list >> chi...@li... >> https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss >> > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > chiPHPug-discuss mailing list > chi...@li... > https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss > |