[eluser]Richard Testani[/eluser]
Why does the following:
Code:
$this->db->select('beers.name AS beer, beers.brewid, beers.tagid, beers.stub AS bstub, tags.id, tags.tag, tags.stub AS tstub, breweries.name');
$this->db->from('beers, tags, breweries');
$this->db->where('beers.tagid', 'tags.id');
result in:
Code:
SELECT `beers`.`name` AS beer, `beers`.`brewid`, `beers`.`tagid`, `beers`.`stub` AS bstub, `tags`.`id`, `tags`.`tag`, `tags`.`stub` AS tstub, `breweries`.`name` FROM (`beers`, `tags`, `breweries`) WHERE `beers`.`tagid` = 'tags.id'
Notice the final equation - beers.tagid = tags.id. CI wraps tags.id is wrapped together and with single quote marks and not ticks like the rest. It's breaking my query result.
How can I troubleshoot this?
Thanks
Rich