I did my best to recreate the query in MySQLi, but I wasn't sure what serveral lines in the original meant. After I'm currently getting the following error, and I don't know what the lines it's referring to are doing (They don't show up in the "Server Behaviors" window). The page is attached.
Notice: Undefined variable: database_local in C:\xampp\htdocs\ALF\public_html\serving\kids\kids_insert_shift.php on line 9
Notice: Undefined variable: local in C:\xampp\htdocs\ALF\public_html\serving\kids\kids_insert_shift.php on line 9
Warning: mysql_select_db() expects parameter 2 to be resource, null given in C:\xampp\htdocs\ALF\public_html\serving\kids\kids_insert_shift.php on line 9
Fatal error: Call to undefined function GetSQLValueString() in C:\xampp\htdocs\ALF\public_html\serving\kids\kids_insert_shift.php on line 10