$idgen = uniqid(rand(), false);
$churchName = $this->input->post('church_name');
$streetAddress = $this->input->post('street_address');
$locationalCity = $this->input->post('locational_city');
$locationalState = $this->input->post('locational_state');
$locationalZip = $this->input->post('locational_zip');
$locationalCountry = $this->input->post('locational_country');
$taxNum = $this->input->post('tax_exemption_number');**
$this->db->query("INSERT INTO church_repo (church_name, street_address, locational_address, locational_zip, locational_country, locational_city, overseer_account_id, tax_exemption_number, status) VALUES('{$churchName}', '{$streetAddress}', '{$locationalCity}', '{$idgen}', '{$locationalState}', '{$locationalZip}', '{$locationalCountry}', '{$taxNum}', 'pending')");
コードは、CIに、私は次のエラーを取得しています、正しく挿入されていないSQLデータを挿入しない:CodeIgniterのが適切上記
Error Number: 1054
Unknown column 'locational_address' in 'field list'
INSERT INTO church_repo (church_name, street_address, locational_address, locational_zip, locational_country, locational_city, overseer_account_id, tax_exemption_number, status) VALUES('bgtg', 'ff', 'rgfr', '270284f1eec6e5bfd4', 'rgrd', 'bdtbdt', 'United States of America', '84894894894', 'pending')
Filename: C:\Workspace\htdocs\Jan-2012\Gospel-links.org\system\database\DB_driver.php
Line Number: 330
'street_address'は存在しませんでした。ありがとうございました。とにかくそれは 'street_address'だったとあなたはどのように知っていたのですか? –
@MichaelGrigsbyテーブルcols($ churchName、$ locationalCity ..)と同じ名前(camelCased)を持つようにポストを割り当てた変数は、「相違点を見つける」というゲームでした:) –