⚠ In case you've missed it, we have migrated 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 is an archived forum. ⚠

  •     

profile picture

Database error



nine

nine
  • profile picture
  • Member

Posted 10 October 2016 - 14:31 PM

Hello,

 

I'm trying it but I have this database error :

Error Number: 1064

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 'FROM `veterinaire`' at line 2

SELECT `veterinaire`. FROM `veterinaire`

Filename: models/Grocery_crud_model.php

Line Number: 194

I use this controller example code  :

public function veterinaires()
	{
		try{
			$crud = new grocery_CRUD();

			$crud->set_theme('datatables');
			$crud->set_table('veterinaire');
			$crud->set_subject('VETO');
			//$crud->required_fields('VETO_CODE_16');
			//$crud->columns('VETO_CIVILITE_16','VETO_NOM_16','VETO_PRENOM_16','VETO_ADR_1_16','VETO_ADR_2_16');
			$crud->columns('veto_nom');
			$output = $crud->render();

			$this->_example_output($output);

		}catch(Exception $e){
			show_error($e->getMessage().' --- '.$e->getTraceAsString());
		}
	}

and calling view like that :

<a href='<?php echo site_url('listes/veterinaires')?>'>Vétérinaires</a> |

Thank you,

 

nine

 


nine

nine
  • profile picture
  • Member

Posted 11 October 2016 - 09:48 AM

it's only works with customers, orders, .....

when you try your own table it fails ....

may be a big joke  this grocery !!!


Rodrigo Lara

Rodrigo Lara
  • profile picture
  • Member

Posted 02 February 2017 - 17:46 PM

Hi, the table "veterinaire" must have primary key