Welcome Guest, Not a member yet? Register   Sign In
Weird Database Behavior
#1

[eluser]SitesByJoe[/eluser]
Everyone,

Thanks for taking a moment to read this: I'm scratching my head in disbelief atm.

Here's the deal: I have a site that's nearing completion. I go to upgrade my CI installation from 1.6.1 to 1.7.0 (1st stupid mistake since I was almost done)

None of my models work!

I rollback - still my models don't work!

I managed to isolate my newly acquired troubles to one particular piece of code:

This works: $this->db->query('SELECT * FROM songs');

This causes a 1051 error: $this->db->select('songs.*');


Here's the controller method I'm using to test:

Code:
function index()
{
      $query = $this->db->query('SELECT * FROM songs');
      print_r($query);
                
      $this->db->select('songs.*');
      $query2 = $this->db->get();
      print_r();
}

Here's the result in the browser:

CI_DB_mysql_result Object ( [conn_id] => Resource id #48 [result_id] => Resource id #68 [result_array] => Array ( ) [result_object] => Array ( ) [current_row] => 0 [num_rows] => 13 [row_data] => )

An Error Was Encountered

Error Number: 1051

Unknown table 'songs'

SELECT songs.*

What is going on?!?!? I tried reloading my CI files several times!


Messages In This Thread
Weird Database Behavior - by El Forum - 02-09-2009, 06:06 PM
Weird Database Behavior - by El Forum - 02-09-2009, 06:34 PM
Weird Database Behavior - by El Forum - 02-09-2009, 06:47 PM
Weird Database Behavior - by El Forum - 02-09-2009, 06:52 PM
Weird Database Behavior - by El Forum - 02-09-2009, 06:59 PM
Weird Database Behavior - by El Forum - 02-09-2009, 07:09 PM
Weird Database Behavior - by El Forum - 02-09-2009, 07:09 PM
Weird Database Behavior - by El Forum - 02-09-2009, 07:12 PM
Weird Database Behavior - by El Forum - 02-09-2009, 07:18 PM
Weird Database Behavior - by El Forum - 02-09-2009, 07:23 PM
Weird Database Behavior - by El Forum - 02-09-2009, 07:28 PM
Weird Database Behavior - by El Forum - 02-09-2009, 07:30 PM
Weird Database Behavior - by El Forum - 02-09-2009, 07:32 PM
Weird Database Behavior - by El Forum - 02-09-2009, 07:40 PM
Weird Database Behavior - by El Forum - 02-09-2009, 08:04 PM
Weird Database Behavior - by El Forum - 02-09-2009, 09:21 PM
Weird Database Behavior - by El Forum - 02-09-2009, 09:38 PM
Weird Database Behavior - by El Forum - 02-09-2009, 11:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB