Table B's column that links to Table A ); * $dbmap[Table B]['belongs_to'][Table A] = array('foreign_key'=> Table A's column where Table B links to ); //Food relationship $dbmap['Food']['belongs_to']['FoodType'] = array('foreign_key'=>'id'); $dbmap['Food']['has_many']['Article'] = array('foreign_key'=>'food_id'); $dbmap['Food']['has_one']['Recipe'] = array('foreign_key'=>'food_id'); $dbmap['Food']['has_many']['Ingredient'] = array('foreign_key'=>'food_id', 'through'=>'food_has_ingredient'); //Food Type $dbmap['FoodType']['has_many']['Food'] = array('foreign_key'=>'food_type_id'); //Article $dbmap['Article']['belongs_to']['Food'] = array('foreign_key'=>'id'); //Recipe $dbmap['Recipe']['belongs_to']['Food'] = array('foreign_key'=>'id'); //Ingredient $dbmap['Ingredient']['has_many']['Food'] = array('foreign_key'=>'ingredient_id', 'through'=>'food_has_ingredient'); */ //$dbconfig[ Environment or connection name] = array(Host, Database, User, Password, DB Driver, Make Persistent Connection?); /** * Database settings are case sensitive. * To set collation and charset of the db connection, use the key 'collate' and 'charset' * array('localhost', 'database', 'root', '1234', 'mysql', true, 'collate'=>'utf8_unicode_ci', 'charset'=>'utf8'); */ $dbconfig['dev'] = array('localhost','jlzfver','sfu','1qaz2wsx','mysql',false, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'); ?>