scarface83 Posted March 27, 2007 Share Posted March 27, 2007 Can anyone see what im doing wrong here ? $abs_value - doesn't work ? <?php if (isset($_GET['date'])) { require ('db_connect.inc'); $query = mysql_query("SELECT tbl_colour.colour, absence_mgt.notes, absence_mgt.datestamp FROM tbl_colour,absence_mgt WHERE absence_mgt.datestamp='$date' ") or die(mysql_error()); $row = mysql_fetch_array( $query ); $any_entry = $row["colour"]; if($any_entry =="" OR $any_entry == "0") { require ('select_absence.php'); unset($_GET['date']); } else { $notes =$row['notes'] ; $abs_value =$row['abs_value'] ; $stamp = $row['datestamp']; list($year,$month,$day) = split("-",$stamp); $datestamp = $day."-".$month."-".$year; echo $abs_value; } } switch ($abs_value) { case 1: $abs_value = "Late"; break; case 2: $abs_value = "Sick"; break; case 3: $abs_value = "Sick (Half Day)"; break; case 4: $abs_value = "AWOL"; break; case 5: $abs_value = "Holiday"; break; case 6: $abs_value = "Holiday (Half Day)"; break; case 7: $abs_value = "Lieu Day"; break; case 8: $abs_value = "Dependency Leave"; break; case 9: $abs_value = "Personal Leave"; break; case 10: $abs_value = "Other"; break; } ?> Link to comment https://forums.phpfreaks.com/topic/44538-solved-what-am-i-doing-wrong/ Share on other sites More sharing options...
scarface83 Posted March 27, 2007 Author Share Posted March 27, 2007 anyone Link to comment https://forums.phpfreaks.com/topic/44538-solved-what-am-i-doing-wrong/#findComment-216392 Share on other sites More sharing options...
per1os Posted March 27, 2007 Share Posted March 27, 2007 Your query does not return the column abs_value. Also remember calling them by assoc you would need to do this: <?php $row['absence_mgt.datestamp']; ?> For it to work properly. Link to comment https://forums.phpfreaks.com/topic/44538-solved-what-am-i-doing-wrong/#findComment-216396 Share on other sites More sharing options...
scarface83 Posted March 27, 2007 Author Share Posted March 27, 2007 thanks frost Link to comment https://forums.phpfreaks.com/topic/44538-solved-what-am-i-doing-wrong/#findComment-216400 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.