public function constructSelectSQL($fields)
    {
        $sql = array();

        $sql[] = "SELECT";

        $sql[] = "`" . implode("`, `", array_keys($fields)) . "`";

        $sql[] = "FROM `" . $this->dbtable . "`";
        $sql[] = "WHERE `" . $this->pk . "` = " . $fields[$this->pk]->getSQL();

        return implode(" ", $sql);
    }
public function constructSelectSQL($fields)
    {
        $sql = array();

        $sql[] = "SELECT";

        $sql[] = "`" . implode("`, `", array_keys($fields)) . "`";

        $sql[] = "FROM `" . $this->dbtable . "`";
        $sql[] = "WHERE `" . $this->pk . "` = " . $fields[$this->pk]->getSQL();

        return implode(" ", $sql);
    }
public function constructSelectSQL ( $ fields ) { $ sql = array ( ) ; $ sql [ ] = "SELECT" ; $ sql [ ] = "`" . implode ( "`, `" , array_keys ( $ fields ) ) . "`" ; $ sql [ ] = "FROM `" . $ this -> dbtable . "`" ; $ sql [ ] = "WHERE `" . $ this -> pk . "` = " . $ fields [ $ this -> pk ] -> getSQL ( ) ; return implode ( " " , $ sql ) ; }
Construct the select sql to retrive model from db
Construct the select sql to retrive model from db