Jump to content


Member Since 17 Jan 2016
Offline Last Active Aug 31 2016 02:06 PM

Topics I've Started

Mysql error with this specific table name

18 January 2016 - 07:29 AM

my code


$crud->set_relation('RoleTypeId', 'type_role', 'Title');


then i got this


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' type_role.Title as s4fe56881 FROM `type_role` ORDER BY `s4fe56881`' at line 1

SELECT type_role., type_role.Title as s4fe56881 FROM `type_role` ORDER BY `s4fe56881`

Filename: models/Grocery_crud_model.php

Line Number: 278



any advice?




Confirm Password always not match with Password

17 January 2016 - 04:36 AM

i had a membership form

with user creating new member with their new password.


so in the form will have Password and Confirm Password field.


in add form, they are working fine


but when it come to edit

Confirm password always not match with Password, although i had clearly input the correct for both fields.

if($crud->getState() == "edit") {
    $crud->field_type('Username', 'readonly');
    $crud->callback_edit_field('Password', function($value){
	return '<input type="password" maxlength="128" value="" name="Password" class="form-control" id="field-Password">';

if($crud->getState() == "insert_validation") {
    $crud->set_rules('Password', 'Password', 'required');
    $crud->set_rules("CPassword", 'Confirm Password', "trim|required|matches[Password]");
} else if($crud->getState() == "update_validation") {
    $crud->set_rules("CPassword", 'Confirm Password', "matches[Password]");

any advices ?