Jump to content

textaiwo

New Members
  • Posts

    3
  • Joined

  • Last visited

textaiwo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks @AP81, I really appreciate, one of the best answers i ever got on this, i knew function would be the way forward but am not sharp in OOP.. I usually get my way around. kidnly confirm the line below has no opening brace as it gives error even when i try to close it and also requires a semi colon ';' when i try to remove it return ($num_rowe >= 1) { Many Thanks
  2. Thanks, how can i make every single loop use a different value for $t_slot_time in line1 until my condition is satisfied and terminate the loop after my condition is satisfied
  3. I am working on a schdeuling system and i urgetly need your help. I have code running well, $t_slot_time is the current timeslot, if condition is yes on line19, $t_slot_time increment by 2, and $t_slot_times becomes new time. how can i repeat same process from 1 to 21 for the new timeslot $t_slot_times where $t_slot_time on line1 is replaced with the new $t_slot_times on line20 and subsequent values after increment until this $num_rowe >= 1 is not satisfied. Thanks 1. $queuen = mysql_query("SELECT * FROM put_exam WHERE sess_id ='".$t_slot_time."'") or die(mysql_error()); 2. $arrDatasa= array(); 3. while($rowsa = mysql_fetch_array($queuen)) 4. { 5. $arrDatasa[]=$rowsa['course_code']. '|'; 6. $docam = array_filter($arrDatasa); 7. } 8. foreach($arrDatasa as $a=> $rowsa){ 9. $docama.=$docam[$a]; 10. } //Store current coursecode to assisgn into currentass $currentass = $e_course_code; //Check for common student between the last assigned course and current course to be assigned, if yes increment timeslot by 2 11. $chkcomms = mysql_query("SELECT student.matric, student.std_name FROM student 12. JOIN course_reg e1 ON e1.matric=student.matric 13. JOIN course c1 ON c1.course_code=e1.course_code 14. JOIN course_reg e2 ON e2.matric=student.matric 15. JOIN course c2 on c2.course_code = e2.course_code 16. WHERE c1.course_code = '".$currentass."' 17. AND c2.course_code RLIKE '%$docama%' 17. GROUP BY student.matric") or die(mysql_error()); // Count number of rows 18. $num_rowe = mysql_num_rows($chkcomms); 19. if($num_rowe >= 1) { 20. $t_slot_times = $t_slot_time + 2; 21. }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.