Welcome Guest, Not a member yet? Register   Sign In
Can't retrieve all records from database [SOLVED]
#3

[eluser]alrightythen[/eluser]
[quote author="andrewtheandroid" date="1257455046"]hey i'm not the most experienced when it comes to joins but ill give it a go.


have you tried doing a manual statement? like
Code:
$sql = 'SELECT * FROM items i, subcategories s WHERE s.cat_ID = items.item_ID';
$this->db->query($sql);

and is that "subcategories" meant to be "categories" in ur code or vise versa..[/quote]


Yes it's suppose to be categories, sorry bout that. But that wasn't the problem.

I've did it your way and there's still only 2 records. Did a sql statement in phpmyadmin en still only got 2 records so it might be my sql statement that's wrong Confused. I just don't see it.

This is my sql statement..
Code:
SELECT * FROM items JOIN categories ON categories.cat_ID = items.item_ID

I'm using innodb tables but my database engine is myISAM I couldn't change that in mamp. But I don't think that's the problem.


So it's not a codeigniter problem anymore but I could still use some help.


Messages In This Thread
Can't retrieve all records from database [SOLVED] - by El Forum - 11-05-2009, 08:51 AM
Can't retrieve all records from database [SOLVED] - by El Forum - 11-05-2009, 09:04 AM
Can't retrieve all records from database [SOLVED] - by El Forum - 11-05-2009, 09:25 AM
Can't retrieve all records from database [SOLVED] - by El Forum - 11-05-2009, 09:39 AM
Can't retrieve all records from database [SOLVED] - by El Forum - 11-05-2009, 09:56 AM
Can't retrieve all records from database [SOLVED] - by El Forum - 11-05-2009, 09:57 AM
Can't retrieve all records from database [SOLVED] - by El Forum - 11-05-2009, 10:00 AM
Can't retrieve all records from database [SOLVED] - by El Forum - 11-05-2009, 10:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB