Subversion-Projekte lars-tiefland.inventar

Revision

Revision 5 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

<?php

        //$Id$

/**
 * @author Lars Tiefland <ltiefland@gmail.com>
 * @copyright 2008
 * @project Inventar Datenbank
 */

        class os
        {
                private $id;
                private $name;
                function __construct($os_id=0)
                {
                        if($os_id)
                        {
                                $GLOBALS["db"]->query("SELECT * FROM os WHERE id=$os_id");
                                $this->id=$os_id;
                                $row=$GLOBALS["db"]->fetch_assoc();
                                $this->name=$row["name"];       
                        }
                        else
                        {
                                $this->id=0;
                                $this->name='';
                        }
                }
        }

?>