Welcome Guest, Not a member yet? Register   Sign In
Quick question! Multiple tables
#1

[eluser]Paleleaves[/eluser]
Hi,

I've a model. Pls see the code below

Code:
<?php
class Articles_model extends Model
{
  function Articles_model()
  {
      parent::Model();
      $this->load->database();
  }
  
function list_participants($num, $offset)
  {
      

$query = $this->db->get('property', $num, $offset);
      return $query;
  }
}
?>

It's working fine but I need pass multiple tables in the place of 'property' in my model. see the code below.

Code:
SELECT * FROM property, district, ptype WHERE property.reqType = ptype.pID AND property.districtName = district.dID

Anybody can help me to modify my model using this query. thanks


Messages In This Thread
Quick question! Multiple tables - by El Forum - 10-28-2009, 10:36 AM
Quick question! Multiple tables - by El Forum - 10-28-2009, 10:47 PM
Quick question! Multiple tables - by El Forum - 10-30-2009, 12:07 AM
Quick question! Multiple tables - by El Forum - 10-30-2009, 01:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB