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

[eluser]xzela[/eluser]
If it's only specific to this query. It may have something to do with the way he's selecting the columns. Perhaps changing the select a bit may help.
Code:
$this->db->select('songs.*, albums.artwork, artists.name, artists.slug');
#12

[eluser]TheFuzzy0ne[/eluser]
I agree that might help, but it doesn't explain why the table can't be found.

Nice avatar, by the way; reminds me of my ex...
#13

[eluser]TheFuzzy0ne[/eluser]
I think that if anything, you might be connecting to the wrong database. Please could you confirm you aren't? I know it's a bit of a no-brainer, but it's the only thing I can think of that would prevent you from accessing your tables. Also, starting at the beginning is the best place to start.

EDIT: Or you user you are connecting as may not have access to said tables.
#14

[eluser]xzela[/eluser]
Yeah, I just tested the 'table.*' select method. For some reason CodeIgniter doesn't like it. It is giving me the same error message: No Such table...

I'm assuming CodeIgnitor is throwing some quotes around 'table.*' and is treating it as a column. try running this:
Code:
$this->db->select('table.*', false);

It should work.
#15

[eluser]TheFuzzy0ne[/eluser]
Good thinking. I think you might have nailed it.
#16

[eluser]SitesByJoe[/eluser]
That was a heck of an idea but no luck. It's throwing the same error.

Let me try reinstalling CI from scratch again - argh... it has to be a bad database CI file or something.

Again, this all started when I replaced the 4 folders in my CI install when upgrading to CI 1.7 to take advantage of the new validation stuff. In disbelief I went back to 1.6.3 - no luck.

Then I thought, "gosh, I think this was 1.6.1 when I first set this up" and tried bring over the 4 folders from 1.6.1 - again no dice - argh!
#17

[eluser]TheFuzzy0ne[/eluser]
Please could I see the first line of your model and the constructor? Is it possible that you've modified one of the original files, and deleted that change when you upgraded?
#18

[eluser]SitesByJoe[/eluser]
I rebuilt the whole site from scratch (well, copy and paste) on top of a CI 1.6.3 installation and everything started working again.

Not sure what happened, but thanks for everyone who pitched into help.

For the record:

Code:
$this->db->select('table_name.*');

Does work just fine.

Thanks so much for helping look into this with me.




Theme © iAndrew 2016 - Forum software by © MyBB