Welcome Guest, Not a member yet? Register   Sign In
only pull one row from db to display problem
#2

[eluser]dadamssg[/eluser]
oh and heres the model im using
Code:
<?php

class Eventmodel extends Model {

    function Eventmodel()
    {
        parent::Model();
    }
    
    function get_event($num)
     {
     $query = $this->db->query("SELECT * FROM test WHERE eventid = '$num'");        
     return $query;    
     }
    
     function get_exists($eventid)    
    {        
    $query = $this->db->query("SELECT * FROM test WHERE end >= NOW() AND eventid = '$eventid'");
    $numrows = $query->num_rows();
    return $numrows;
    }
}
?>


Messages In This Thread
only pull one row from db to display problem - by El Forum - 01-10-2010, 01:56 PM
only pull one row from db to display problem - by El Forum - 01-10-2010, 01:58 PM
only pull one row from db to display problem - by El Forum - 01-10-2010, 02:35 PM
only pull one row from db to display problem - by El Forum - 01-10-2010, 02:45 PM
only pull one row from db to display problem - by El Forum - 01-10-2010, 02:47 PM
only pull one row from db to display problem - by El Forum - 01-10-2010, 02:57 PM
only pull one row from db to display problem - by El Forum - 01-10-2010, 03:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB