Welcome Guest, Not a member yet? Register   Sign In
Please help me
#4

[eluser]John_Betong[/eluser]
Please use CODE options to wrap your code.

Code:
$data = array
       (
         ‘title’ => $title ,
         ‘from_main_section’ => ‘0’
       );
$this->db->insert(‘section’, $data);

// added this line
echo $this->db->last_query();

I modified your code to suit my database, tables and fields and the insertion worked fine. I also had to change the backticks to single quoation marks.


Have you:
1. loaded the database correctly?
2. Do you have other SQL statements that are working correctly?
3. Do either title or from_main_section have unique indexes
4. Have you manually tried using the SQL statement in PhpMyAdmin?

 
 
 


Messages In This Thread
Please help me - by El Forum - 08-29-2010, 07:41 AM
Please help me - by El Forum - 08-29-2010, 07:46 AM
Please help me - by El Forum - 08-29-2010, 07:48 AM
Please help me - by El Forum - 08-31-2010, 03:26 AM
Please help me - by El Forum - 08-31-2010, 06:46 AM
Please help me - by El Forum - 08-31-2010, 08:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB