Click here to Skip to main content
15,847,077 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys!

I am trying to add to oracle database using CodeIgniter.
Code below is the query to add to the database:
<?php <br mode="hold" /?>class System_model extends Model// this is the model class that all query statement are excecuted 
function insertNewNationality($nationality)
//function to add new nationality to the cvdb
{									//note: cvdb is the name of the database
$data=array('nationality'=&gt;$nationality);//column name in the nationality_ids table
$this-&gt;db-&gt;insert('nationality_ids',$data);//query statement to insert value to nationality_ids table the cvdb

When coding using CodeIgniter, normally we will have three different folders:
One is Controller another one is View and last one is Model. Model is where all query function are.

In my View when I try to add value to the oracle database i get this error:
A Database Error Occurred  
Error Number:INSERT INTO "gender_ids" ("gender") VALUES ('male')

Can anyone help me please :(
Updated 25-May-10 2:45am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900