I am using CodeIgniter to insert a new record to an Oracle table in php. THe code is on the below:
public function insert_street_file( $insdata = null )
{
if ($insdata == null)
{
// return false;
}
else
{
$insdata = array(
'NAME'=>"Eray",
'SURNAME'=>"BAlk",
'CITY'=>"HALIFAX",
'PROVINCE'=>"NS",
'LSTNOLO'=>1,
'LSTNOHI'=>2,
'RSTNOLO'=>3,
'RSTNOHI'=>4,
'POSTCODE'=>"b3h1s8",
'POSTDIR'=>"1s8",
'PREDIR'=>"b3h",
'STR_CODE'=>30002
);
$results =$this->oracle_db->insert("$this->street_file_table_name", $insdata);
return $results;
And i am getting the error below:
Error Number:
INSERT
INTO People
("NAME", "SURNAME", CITY", "PROVINCE", "LSTNOLO", "LSTNOHI",
"RSTNOLO", "RSTNOHI", "POSTCODE", "POSTDIR", "PREDIR", "STR_CODE")
VALUES ('Eray', 'Balk', 'Halifax', 'NS', 1, 2,
3, 4, 'b3h1s8', '1s8', 'b3h', 30002)
Filename: C:\inetpub\ci-2-1-3-system\database\DB_driver.php
Line Number: 330
- There is no error number specified, so I don't know what exactly the problem is.
- DB connection is provided, any select query works well.
- $this->street_file_table_name value is correct
- column names are also in capital letters in the Oracle db. All column names and table name are good.
I appreciate if you help me solve this issue.
Edit: The missing quotes were typos. It is not the real problem.