<?php /** * User: Engr. Naveed * Date: 09-Feb-15 * Time: 12:25 AM */ require_once __DIR__ . "/" . "../initialize.php"; $msg = "Successfully Saved to Database."; $msgType = 'success'; if (isset($_POST['attendance'])) { // prpost(); foreach ($_POST['attendance'] as $recArray) { $objToSave = Emplyee_attendance_record::instantiate($recArray); $objToSave->pr(); if (!$objToSave->dbSave()) { $msg = "Could not save some records. Please check your input values. Error Code: sa-err"; $msgType = 'danger'; $formErrors = $objToSave->getErrors(); } } $session->setMessage($msg, $msgType); reloadCurrentPage(); }
<?php /** * Created by Naveed-ul-Hassan Malik * Auto-Generated Using Script On: * Date: Sun 18-Jan-2015 * Time: 08:18 PM PST */ class Emplyee_attendance_record extends Emplyee_attendance_recordAuto { static $joinedTables = array(); static $childRefField = ''; static $displayFields = array('employee_id', 'date'); function __construct($id = null) { parent::__construct($id); $this->employee_id->fkeyInfo = new FKeyInfo('Employe', 'id', 'hint'); } } Emplyee_attendance_record::$childClasses = array();