php - Date field's rows are not shown in the grocery crud table -
i new grocery crud. impressed how time saver library , want thank great developers worked on project.
i have small problem showing date field in table. when press edit button , it's shown in edit , view pages. doesn't appear in table.
even if create record myself add record button, it's saved not shown in table. have checked many things default format of date in library.
$config['grocery_crud_date_format'] = 'sql-date'; i tried different web browsers
this table , how update date , save db:
$datestring = "%y-%m-%d"; $time = time(); $data = array( 'attendence_date_daily' => mdate($datestring, $time), 'check_in_time' => null, 'check_out_time' => null, 'attendence_status' => null, 'employee_comment' =>null, 'deducted_today' => 0, 'user_id' => $row->id ); this how created table
public function edit_daily_record() { $crud = new grocery_crud(); $crud->columns('daily_record_id','attendance_date_daily','check_in_time','check_out_time','attendence_status','employee_comment','deducted_today','user_id'); $crud->set_table('daily_attendence_record'); $crud->display_as('attendance_date_daily','date') ->display_as('user_id','employee'); $crud->set_subject('daily record'); $crud->set_relation('user_id','users','username'); $output = $crud->render(); $this->_example_output($output); } where 'attendance_date_daily' of type date in mysql db . fields shown correctly except date
'daily_record_id' auto increment pk 'user_id' fk
can please me problem? image 1

image 2

i solved of mr. paul savostin 1 of advanced members in grocery crud advance members.
the issue simple typo. name of filed in database different controller 1 letter.
this shows how can letter change whole code!
Comments
Post a Comment