[phorm] [Phorm:] Re: Check box question

  • From: webbbs@xxxxxxxxx
  • To: support@xxxxxxxxx
  • Date: 2 May 2003 23:32:27 -0000

The following new message has been posted on Phorm Support Forum at 
<http://www.phorm.com/support/>. 

*************************************************************************** 

  MESSAGE:  (#2625) Re: Check box question 
            <http://www.phorm.com/support/?rev=2625> 
  AUTHOR:   Patrick O'Hara 
  DATE:     May 2, 2003 at 7:32 p.m. EST 

  Reply To: (#2624) Re: Check box question 
  Author:   Rich 
  Date:     May 2, 2003 at 11:40 a.m. EST 

> Patrick, 

> Well, I thought I had a handle on it, but now I'm a 
> bit lost. I changed the query to: 

> $PHORM_MYTABLE = "newproj"; 

> $PHORM_DBFETCH = "Piece, EstHrs, Service, 
> Turnaround, DocType, FileType, Platform, Pages"; 

> $PHORM_DBWHICH = "(File1 = '$F1' OR File1 = '$F2' 
> OR File1 = '$F3' OR File1 = '$F4' OR File1 = '$F5' OR 
> File1 = '$F6' OR File1 = '$F7' OR File1 = '$F8') AND 
> ProjNum ='$Proj_Num'"; 

> ...and when I used the debug72 and ran in MySQL, it 
> gave the correct data each time. So, I think the issue 
> is putting the right info in the ack page. What's 
> confusing me is I am using an array for the records 
> *{{PHORM_DBFRSLT[0][Piece]}}*... etc. for all 
> variables. How do I reflect this in the for statement? 

> $nextSection = 1; 
> --for ($i = 0; $i > 8; $i++) { 
> ---$varName = "F" . $i; 
> ----if (isset($$varName)) { 
> -----$sectionName = "section" . 
> $nextSection++; 
> -----$$sectionName = $$varName; 
> } 
> } 

> Also, each "section" that I have is supposed 
> to output 8 pieces of data (per section) from the 
> database to the ack page. 

> Thanks again... Rich 

Okay - what I think you are trying to do, correct me if I'm wrong, is that you 
want to have three sections on the ack page, each section should have the 
eight peices of data from the database, that relate to the file specified on 
the previous form.... The column in the database is named file1, and you are 
checking this against the eight possible options. 

$PHORM_MYTABLE = "newproj"; 

$PHORM_DBFETCH = "Piece, EstHrs, Service, Turnaround, DocType, FileType, 
Platform, Pages, File1"; 

$PHORM_DBWHICH = "(File1 = '$section1' OR File1 = '$section2' OR File1 = 
'$section3') AND ProjNum = '$Proj_Num'"; 

You can do it using all eight files - but you've just run the loop to extract 
the three files, so why not use them? (it also means you can add more files 
easily later) Check that this gives you the correct information, by tracing 
debug flag 72 and running the query in phpMyAdmin. Now to get it on the page. 

Now we need to extract all the data from the files into the appropriate 
sections. Can you please confirm that the following is kinda what you want it 
to do... 

Entries related to file {{section1}}: 
1. Piece: XXX, EstHrs: XXX, Service: XXX, etc 
2. Piece: XXX, EstHrs: XXX, Service: XXX, etc 
3. Piece: XXX, EstHrs: XXX, Service: XXX, etc 

Entries related to file {{section2}}: 
1. Piece: XXX, EstHrs: XXX, Service: XXX, etc 
2. Piece: XXX, EstHrs: XXX, Service: XXX, etc 
3. Piece: XXX, EstHrs: XXX, Service: XXX, etc 

Entries related to file {{section3}}: 
1. Piece: XXX, EstHrs: XXX, Service: XXX, etc 
2. Piece: XXX, EstHrs: XXX, Service: XXX, etc 
3. Piece: XXX, EstHrs: XXX, Service: XXX, etc 

If it is I'll tell you how to do it, if not - can you tell me what you want it 
to look like, and I'll work it out. Is the contents of File1 in the database a 
unique file, or would there be multiple files. The above example assumes 
non-unique entries. 

Regards, 

Patrick O'Hara 
WhitsundayIT 
QLD, Australia 

patrick@xxxxxxxxxxxxxxxx 
www.whitsundayit.com 

*************************************************************************** 

This is an automatically-generated notice.  If you'd like to be removed from 
the mailing list, please visit Phorm Support Forum at 
<http://www.phorm.com/support/>, or send your request to webbbs@xxxxxxxxxx  If 
you wish to respond to this message, please post your response directly to the 
board.  Thank you! 
-------------------------------------------------
You are receiving this message because you are subscribed to the Phorm mailing 
list. To send messages to the mailing list, simply send email to 
phorm@xxxxxxxxxxxxx from the address you have subscribed. You may unsubscribe 
from the list by sending email to phorm-request@xxxxxxxxxxxxx with 
'unsubscribe' in the SUBJECT field.

Other related posts: