It'll be problematic, because every time you do SELECT to DB, there's overhead of connecting to DB server and all that, so the less individual queries you have to server one page request, the better.
If in your view you have one html <table> tag, you could try to join two tables together, and then all the data would be available on per row bases.
Another a bit more extensive way to do it is get all necessary data from the first table, then loop through it once, get all the necessary IDs, make single query to second table using ids from first table in SQL IN(id, id, id...) statement. Things that come back, you can store in associative PHP array in form of foreach ($q->result() as $row) { $secondTableData[$row->id] = $row; }
Now, in your HTML table you can access data from second table - $secondTableData[$row->linked_id]->label
One thing to note is there's limit on how many items you can feed into IN() statement, and also because CodeIgniter runs regex to validate query builder values, you can run into some issues if you expect thousands of rows back from second table.