I have a php report page I'm working on that's giving me some problems. It's designed to be used on multiple systems; as far as I know, all of these systems are identical. On the system I did development on, the page displays information as needed. On the others, I don't get to see it unless I knock out a specific block of code. Thing is, the code in question doesn't relate to what I'm doing.

This page is designed to be used for two reports. They draw the same information, and they have almost the same format. Therefore, I figured that, since the two are also supposed to always be displayed together, it'd be a good idea to simply modify the original code so it had segments for report A and segments for report B.

Which path is followed is determined by a specific flag variable, $_90Plus. In report A, $_90Plus is supposed to be false; in report B, $_90Plus is supposed to be true.

As I mentioned above, when I'm running the program, I get what seems to me to be a rather strange error. Report B (remember, that's $_90Plus == true) doesn't run to completion if this segment of code, which has meaning only for report A, isn't commented out.

if ($_90Plus == 'False')
              $statnSQL = "****";
              $statnResult = @mysql_query($statnSQL) or die("could not complete station query");
              $row2 = @mysql_fetch_array($statnResult);
              $statnCnt = $row2["count(Stn_Seq)"];

              $statnSQL = "****";
              $statnResult = @mysql_query($statnSQL) or die("could not complete station query");
              $row2 = @mysql_fetch_array($statnResult);
              $statnCntChk = $row2["count(Stn_Seq)"];

(SQL statements removed as it's business information and I don't want to risk it getting scattered around online.)

Other sections of the code that rely on the 'if ($_90Plus == 'False')' code being set seem to work correctly, only this one does not. And again, if I completely comment it out, I get my report B data correctly, but not my report A data, which does require this code.

Anybody have any ideas what might be causing this kind of problem?

10 Years
Discussion Span
Last Post by EnderX
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.