Subversion-Projekte lars-tiefland.inventar

Revision

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

<?php

        //$Id: hardware.class.php 6 2008-05-10 16:29:22Z lars $

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

        class hardware
        {
                private $id;
                private $name;
                private $type_id;

                function __construct($id=0)
                {
                        if($id)
                        {
                                $res=$GLOBALS["db"]->query("SELECT * FROM hardwares WHERE id=$id");
                                $this->id=$id;
                                $row=$res->fetchRow();
                                $this->name=$row["name"];       
                        }       
                        else
                        {
                                $this->id=0;
                                $this->name='';
                                $this->type_id=0;
                        }
                }
        }

?>