•
•
•
•
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
![]() |
•
•
Join Date: Aug 2006
Posts: 999
Reputation:
Rep Power: 4
Solved Threads: 1
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.
(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?
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.
Kumquat.
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- DHCP Problem causing ip to be 169.X.X.X and not 192.168.X.X (Windows NT / 2000 / XP / 2003)
- php and mod_rewrite problem (PHP)
- PHP problem - register page (PHP)
- Learning PHP but problem with script (PHP)
- Preview Upload Image Problem (PHP)
- random page crashes in php (PHP)
- emails sent to bulk folder....(Is this a php problem?) (PHP)
Other Threads in the PHP Forum
- Previous Thread: phpbb mod
- Next Thread: PHP mail question


Linear Mode