the code is huge.... i'll post whats relevant. there may be a few irrelevant things in 
there... but hell... if your willing to look i'm willing to post

i know what works so will skip down lower to prevent wasting your time
and if ya could please cc your responce to [EMAIL PROTECTED], though if to much trouble 
i understand

i thought i was close.. but then compared the data and it doesnt match.. for instance 
its spitting out the right subcluters.. and untill i asked for the coomparison it was 
fine.. i cant do a percentage match or trial till it gives right info..



                                                          while($i_sub<$num_sub){
                                                                 $sub_id = 
@mysql_result($result_sub,$i_sub,"subcluster_id");
                                                                 $result_per = 
mysql_query("select ques_ans from data_1 where ass_id=$ass_id AND user_id=$user_id AND 
subcluster_id='$sub_id'",$db);
                                                                 $num_per = 
mysql_num_rows($result_per); 
                                                                 $i_per=0;   //this 
seems wrong but will count all subclusters equally 1 at a time through the while 
"should"
                                                                 $i_per1 = 0; // need 
a double count so need two seperate
                                                                 $cper = 0;
                                                                       
while($i_per<$num_per){
                                                                            // so we 
need to run the while, probably need to cut the ending out here to add to end of total
                                                                             //gonna 
change this into an include so its not listed 3 times here-maybe
                                                                              // do 
math function
                                                                             $nper = 
$num_per;
                                                                             $nper2 = 
($nper*5);  // max reading to devide by
                                                                             //answer 
= // need to add all the answers here
                                                                                     
while($i_per1<$num_per){
                                                                                       
     $cper = $cper;
                                                                                       
     $cper1 = @mysql_result($result_per,$i_per1,"ques_ans");
                                                                                       
     $i_per1++;
                                                                                       
     $cper2 = @mysql_result($result_per,$i_per1,"ques_ans");
                                                                                       
     $cper = ($cper+$cper1+$cper2);
                                                                                       
    // $cper3 = $cper; // this is just an easy extraction
// i think this actualy might work

                                                                               echo 
"sub=$sub_id = $cper<p>";
                                                                                       
     $i_per1++;};  // this should loop through output to count the results total   
//TEST
//echo "cper3 = $cper3";                                    
                                                       
                                                                             $i_per++;
 };
                                                               $i_sub++;};

i know theres some redundant code in there etc.. but hey.. till it works i dont like 
to delete



---------- Original Message ----------------------------------
From: Justin Farnsworth <[EMAIL PROTECTED]>
Date: Tue, 25 Dec 2001 09:28:53 -0500

>I think you need to post the code.  The description of the
>problem is a bit ambiguous.
>
>_justin
>
>Webmaster wrote:
>> 
>> Hello.. of all days i have a project thats to be shown tomorrow.
>> 
>> i cannot get the dam thing to work
>> it should be simple i'd think
>> 
>> i would post code and all and if asked will
>> 
>> but it comes down to this.. i am using php 4 and mysql.. and doing math
>> i have say 40 entries in the database, 20 for two differant surveys.. anytime anew 
>person fills out the survey they get a unique id
>> i have it set to grabe the results from each unigue id for each question through 
>mysql.. but it seems to stop shot about 4 questions..
>> i even tried dropped the while loop 4 questions shorter "-4" and it still stop the 
>same place.. of all days for this to occure.. i know
>> but if anyone has a clue please offer suggestions.. also plase cc [EMAIL PROTECTED] 
>with your reply.. thanks
>> 
>> --------------------------------------------------
>> Your Guardian Angel... find out here http://www.angelhaven.com/aodmail/
>> Come Cruisin with the Angels http://www.AngelCruise.com
>> Sign up for your free AngelHaven E-mail Today http://www.angelhaven.com/mail/
>> 
>> ---------------------------------------------------------------------
>> Before posting, please check:
>>    http://www.mysql.com/manual.php   (the manual)
>>    http://lists.mysql.com/           (the list archive)
>> 
>> To request this thread, e-mail <[EMAIL PROTECTED]>
>> To unsubscribe, e-mail <[EMAIL PROTECTED]>
>> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>-- 
>Justin Farnsworth
>Eye Integrated Communications
>321 South Evans - Suite 203
>Greenville, NC 27858 | Tel: (252) 353-0722
>
>---------------------------------------------------------------------
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail <[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>

--------------------------------------------------
Your Guardian Angel... find out here http://www.angelhaven.com/aodmail/
Come Cruisin with the Angels http://www.AngelCruise.com
Sign up for your free AngelHaven E-mail Today http://www.angelhaven.com/mail/

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to