⚠ In case you've missed it we are migrating to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This forum is read-only and soon will be archived. ⚠


manusimpson

Member Since 31 May 2018
Offline Last Active Aug 06 2018 01:48 PM
-----

Topics I've Started

SELECT `table`. FROM `table`

31 May 2018 - 04:43 PM

Hi guys, I'm new in Grocery world so I hope do not ask a silly question.

I did one function in my controller that works great even with multiple table relation, but now I did another function with a very very simple crud and I'm getting this error, like that the query is being created without selecting fields o *.

 

This is my code:

public function historico()
{
	if($this->session->is_session){
		$crud = new grocery_CRUD();
		$crud->set_table('historico');
		$output = $crud->render();
		$output->css_files[] = base_url() . 'assets/bootstrap/css/bootstrap.min.css';
		$output->js_files[] = base_url() . 'assets/bootstrap/js/bootstrap.min.js';
		$this->load->view('historico', $output);
	}else{
		$this->login();
	}
}

and response:

 

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM `historico`' at line 2

SELECT `historico`. FROM `historico`

Filename: [***]/system/database/DB_driver.php

Line Number: 691

 

Thanks for reply.

 

Manuel.-