Welcome Guest, Not a member yet? Register   Sign In
Comments on blog
#14

[eluser]davehedgehog[/eluser]
Ok think Ive almost got it now, besides a small problem with the model~
Code:
$query2 = $this->db->query("select * from 'comment' where 'entry_id' = $id ORDER BY 'date' DESC");

  if($query2->num_rows() != 0){
  return $query2->row_array();
  }
  else
  {
   return false;
  }

This gives me the error~
Fatal error: Call to a member function num_rows() on a non-object

if I change the query to say~
Code:
$query = $this->db->get_where('comment',array('entry_id' => $id));

then it kinda works, as in it echos out the right comment for each article, but it gives me the first character for each coloumn entry, for all three fields~
name:2
Post:2
Date:2
name:9
Post:9
Date:9
name:j
Post:j
Date:j
name:b
Post:b
Date:b
name:2
Post:2
Date:2
name:a
Post:a
Date:a


Messages In This Thread
Comments on blog - by El Forum - 04-10-2013, 07:14 PM
Comments on blog - by El Forum - 04-11-2013, 02:54 AM
Comments on blog - by El Forum - 04-11-2013, 05:50 AM
Comments on blog - by El Forum - 04-11-2013, 06:21 AM
Comments on blog - by El Forum - 04-11-2013, 06:28 AM
Comments on blog - by El Forum - 04-11-2013, 06:38 AM
Comments on blog - by El Forum - 04-11-2013, 07:08 AM
Comments on blog - by El Forum - 04-11-2013, 07:12 AM
Comments on blog - by El Forum - 04-11-2013, 07:22 AM
Comments on blog - by El Forum - 04-11-2013, 07:47 AM
Comments on blog - by El Forum - 04-11-2013, 07:49 AM
Comments on blog - by El Forum - 04-11-2013, 09:15 AM
Comments on blog - by El Forum - 04-11-2013, 09:38 AM
Comments on blog - by El Forum - 04-11-2013, 02:50 PM
Comments on blog - by El Forum - 04-11-2013, 06:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB