0
この特定のOracleクエリです: -Codeigniterのアクティブレコードにsequence.nextvalの値を挿入する方法は?
今INSERT INTO tbl_admin
(admin_id, admin_username, admin_email,
admin_password, admin_fname, admin_lname, admin_type)
VALUES
('TBL_ADMIN_SEQUENCE.nextval', 'saswat2', '[email protected]',
'$2a$16$y61NYSwQXSRA4m4GoRWJ5OhthFzfZ9e6yp8QcVhBNgSQK16Q.VkXq', 'Saswat', 'Routroy', 0);
、CodeIgniterのアクティブなレコードを使用して、このquesryを実行するために、私はこのコードを書いています: -
$data = array(
$this->identifier_field => 'TBL_ADMIN_SEQUENCE.nextval',
$this->username_field => $username,
$this->email_field => $email,
$this->password_field => $password,
$this->first_name_field => $first_name,
$this->last_name_field => $last_name,
$this->type_field => intval($type),
);
// If inserting data fails
if (! $this->oracleDB->insert($this->user_table, $data))
{
// Return false
return FALSE;
}
どうすればこの問題を解決できますか?私は関数を使ってクエリを書くことができますが、私はアクティブなレコードを使ってそれをやりたいのです。
注: - Oracle 10g Express Editionを使用しています。
これは疑問の答えですが、このコードが何をするべきであるかを実際にテキストのいくつかの行に記述することをお勧めします。 –