I think I'm having a problem with [b]Field Names with spaces[/b] in them.
The problems appear to show up in two ways:[list]
[*]If the Primary Key field has a space in it's name, then the system will throw an error when editing the any record
[*]If the Field name has a space it is not sortable by that field.
[/list]
CodeIgniter 2.1.2
GroceryCRUD 1.2.3
[b]Baseline[/b] - I followed along with the "newbies grocery CRUD installation guide" and everything works.
[b]Working Changes made[/b] - I added a function/method to the controller from the tutorial (/application/controllers/main.php)
New function:
public function QuarterlyTaxAdjustments(){
$tablename = __FUNCTION__ ;
$this->grocery_crud->set_table($tablename);
$output = $this->grocery_crud->render();
$this->_example_output($output);
}
The above code works
[b]Non Working Changes made[/b]:
New Function:
public function Companies(){
$tablename = __FUNCTION__ ;
$this->grocery_crud->set_table($tablename);
$output = $this->grocery_crud->render();
$this->_example_output($output);
}
As you can see [b]the functions are identical[/b] - The Companies table has a primary key named `Company ID`
I believe this space is the issue - is there any known fix besides renaming the table?
Thanks -
Jack
[i]Also, I haven't tried yet, but I have a few tables that use compound Primary Keys - Does anyone know if those are supported?
Lastly, I see in the grocery_crud_model.php quite a few decision tree's around CI version 2.1.0 and 2.1.1 - I'm on CI 2.1.2 - not sure if that matters, but it's basically being treated as if it were CI 2.0.X in the code.[/i]
[i]- Jack[/i]