A Database Error Occurred Error Number 1054
Contents |
here for a quick overview of a database error occurred error number 1146 the site Help Center Detailed answers to any questions db function failed with error number 1054 you might have Meta Discuss the workings and policies of this site About Us error number 1054 in codeigniter Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs a database error occurred while processing this request Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error Number: 1054 Unknown column issue with
A Database Error Occurred Repository Has Not Been Created
database table insert up vote 0 down vote favorite I'm having an issue with the following code to add records to an 'offer' db table in CodeIgniter.. Database table (mySQL): 1 ID int(11) No 2 OfferName varchar(150) latin1_swedish_ci No 3 OfferLength varchar(150) latin1_swedish_ci No 4 OfferTitle varchar(150) latin1_swedish_ci No 5 OfferDescription varchar(300) latin1_swedish_ci No 6 OfferURL varchar(150) latin1_swedish_ci No 7 OfferContent varchar(300) latin1_swedish_ci No 8 Key varchar(10) latin1_swedish_ci Yes NULL Method in the model (offer_model.php): public function entry_insert(){ $data = array( 'OfferName' => $this->input->post('OfferName'), 'OfferLength' => $this->input->post('OfferLength'), 'OfferTitle' => $this->input->post('OfferTitle'), 'OfferDescription' => $this->input->post('OfferDescription'), 'OfferURL' => $this->input->post('OfferURL'), 'OfferContent' => $this->input->post('OfferContent'), ); $this->db->insert('offers',$data); } Controller: function addOffer() { //if the form is submitted if ($this->input->post('mysubmit')) { //insert data into db using offer_model model $this->offer_model->entry_insert(); } Form in the view:
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more
A Database Error Occurred While Getting License Information
about Stack Overflow the company Business Learn more about hiring developers or posting ads error number: 1054 unknown column 'data' in 'field list' with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow error number 1054 unknown column in 'field list' is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up A Database Error Occurred Error Number: 1054 up vote 0 down vote http://stackoverflow.com/questions/14512299/error-number-1054-unknown-column-issue-with-database-table-insert favorite A Database Error Occurred Error Number: 1054 Unknown column ' Fecha_Salida BETWEEN 2013-06-05 AND 2013-06-05' in 'where clause' SELECT `Fecha_Entrada`, `Fecha_Salida` FROM (`tbl_fecha`) WHERE ` Fecha_Salida BETWEEN 2013-06-05 AND 2013-06-05 This is the code that giving me this error. $this->db->select('Fecha_Entrada,Fecha_Salida')->from('tbl_fecha')->where(" Fecha_Salida BETWEEN $fee AND $fes"); $query = $this->db->get(); foreach($query->result() as $row) { echo $row->Fecha_Entrada; } codeigniter share|improve this question edited Oct 23 '13 at 23:24 Jonathan Leffler 437k61507821 http://stackoverflow.com/questions/16931377/a-database-error-occurred-error-number-1054 asked Jun 5 '13 at 4:06 user2454131 11 That means table 'tbl_fecha' does not have a column with name 'Fecha_Salida'.Can you show the select query you need? –웃웃웃웃웃 Jun 5 '13 at 4:09 Possible duplicate of A Database Error Occurred Error Number: 1054 –Ankur Kumar Apr 9 at 10:08 add a comment| 2 Answers 2 active oldest votes up vote 0 down vote May be there is no column named Fecha_Salida in your table and consider the cases of the name also and try to use where_between like this $this->db->select('Fecha_Entrada,Fecha_Salida')->from('tbl_fecha')->where_between(" Fecha_Salida , $fee , $fes"); share|improve this answer answered Jun 5 '13 at 4:50 Gautam3164 21.6k13657 add a comment| Did you find this question interesting? Try our newsletter Sign up for our newsletter and get our top new questions delivered to your inbox (see an example). Subscribed! Success! Please click the link in the confirmation email to activate your subscription. up vote 0 down vote You can use select() function in pass array argument..like $this->db->select(array('Fecha_Entrada','Fecha_Salida'))->from('tbl_fecha')->where(" Fecha_Salida BETWEEN $fee AND $fes"); Try it... this code is 100% working, if Fecha_Salida field is exist in database table.. so may be help you this code share|improve this answer edited Jun 5 '13 at 14:37 an
Number 1054 - Unknown column 'text_content_' in 'field list' Thread Closed 0 Vote(s) - 0 Average 1 http://forum.codeigniter.com/thread-50815.html 2 3 4 5 Thread Modes Error Number 1054 - Unknown column 'text_content_' in 'field list' El Forum Newbie Posts: 0 Threads: 0 Joined: Nov 2014 Reputation: 4 #1 04-10-2012, 03:51 AM [eluser]yuro[/eluser] hello, The site is not found on Google. It displays the status 500. The following error error number message appears: Quote:--Database Error--
{
$this->db->select("text_content_".$this->session->userdata('web_lang')." AS text_content, menu.menu_name_".$this->session->userdata('web_lang')." AS menu_name,banner");
$this->db->from($this->_tablesincorporated['content']);
$this->db->join($this->_tablesincorporated['menu'], 'menu.content_id = content.content_id', 'LEFT');
$this->db->where("content.content_id",$id);
$query = $this->db->get(); //Here's the problem where gives me the Status 500, but when I commented this part, I get the Status 200, but than is the if-loop wrong.
if($query->num_rows())
{
return $query->row();
} else {
return FALSE;
}
} Help please Find El Forum Newbie Posts: 0 Threads: 0 Joined: Nov 2014 Reputation: 4 #2 04-10-2012, 05:17 AM [eluser]smilie[/eluser] Well, as MySQL itself said, table: 'text_content_' does not exist. It is also a bit strange to see table ending with _ mostly is this so called table prefix. Only way to solve this is to check in that database, what is correct name of the table. Cheers, Sm