User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,519 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,821 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 305 | Replies: 1
Reply
Join Date: Aug 2006
Posts: 999
Reputation: EnderX is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
EnderX EnderX is offline Offline
Posting Shark

PHP Problem, not sure what's causing.

  #1  
Oct 2nd, 2007
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?
"No trees were harmed in the production of this post. However, several electrons were severely inconvenienced."

Kumquat.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2006
Posts: 999
Reputation: EnderX is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
EnderX EnderX is offline Offline
Posting Shark

Re: PHP Problem, not sure what's causing.

  #2  
Oct 2nd, 2007
Please ignore, problem solved.
"No trees were harmed in the production of this post. However, several electrons were severely inconvenienced."

Kumquat.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 4:06 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC