Skip to content

Instantly share code, notes, and snippets.

View andho's full-sized avatar

Amjad Mohamed andho

View GitHub Profile
@andho
andho / shift_update.php
Created November 29, 2012 05:32 — forked from FoxRocks76/updated code
code for andho
<?php
if(isset($_POST['submit']))
{
if(isset($_POST['offdays']))
{
//$off is set through the config settings//
$shift = $_POST['shift'];
$from = $_POST['from'];
$to = $_POST['to'];
@andho
andho / shift_update.php
Created November 29, 2012 04:21 — forked from FoxRocks76/updated code
code for andho
$sql = ("UPDATE schedule SET Shift_ID = '$shift' WHERE (`Date` BETWEEN '$from' AND '$to') AND (Emp_ID = '$emp_id')");
if(!$result_shift_update_query = $mysqli->query($sql))
{
echo "INSERT ERROR 1 HERE";
}
echo "Shift UPDATE SQL: " . $sql . "<br><br>";//error checking
$sql = ("SELECT `Date` FROM schedule WHERE (`Date` BETWEEN '$from' AND '$to') AND (Emp_ID = '$emp_id')");