Welcome Guest, Not a member yet? Register   Sign In
Need some DB help
#8

[eluser]sandwormusmc[/eluser]
Code:
$sql='SELECT * FROM `books` LEFT OUTER JOIN author ON book_author_id=author.author_id;';
  $result=$this->db->query($sql);
  // error checking
  // return something from the result, i.e. $result->result_array() or $result->result_object()

Otherwise you might be doing 100*N DB queries for 100 books, checking for their authors. The above will be a large data set, too, but refining your SELECT portion to only include the columns you need should help performance.


Messages In This Thread
Need some DB help - by El Forum - 03-12-2008, 04:07 PM
Need some DB help - by El Forum - 03-12-2008, 06:30 PM
Need some DB help - by El Forum - 03-12-2008, 06:45 PM
Need some DB help - by El Forum - 03-12-2008, 07:04 PM
Need some DB help - by El Forum - 03-13-2008, 03:17 AM
Need some DB help - by El Forum - 03-13-2008, 07:29 AM
Need some DB help - by El Forum - 03-13-2008, 07:50 AM
Need some DB help - by El Forum - 03-13-2008, 08:49 AM
Need some DB help - by El Forum - 03-13-2008, 01:50 PM
Need some DB help - by El Forum - 03-13-2008, 02:37 PM
Need some DB help - by El Forum - 03-13-2008, 03:08 PM
Need some DB help - by El Forum - 03-13-2008, 07:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB