• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
codeigniter-2.1.3 with sqlite3 db

#1
[eluser]Unknown[/eluser]
I'm writing a blog, everything is working fine on xampp localhost, but when i implemented it on the server, the following code isn't working

Code:
$this-db->where('id', $id);
$this->db->get('blogs');

and

Code:
$this->db->insert('blogs, $data);
return $this->db->insert_id();

and

Code:
$this->db->insert('images', $data);

but in the other hand, the following is working:
Code:
$this->db->get('blogs')

can anyone help me to solve this?

#2
[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums!

Do you have error reporting enabled?

Try putting this at the top of your index.php file:

Code:
ini_set('display_errors', '1');
error_reporting(E_ALL);

You can also enable the profiler with:
Code:
$this->output->enable_profiler(TRUE);

That should give you a clearer picture of what's going on. Also make sure database errors are enabled in ./application/config/database.php
Code:
$db['default']['db_debug'] = TRUE;

I'm not convinced it's "not working". I suspect it's not working because you may be using it incorrectly.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.