Subversion-Projekte lars-tiefland.inventar

Revision

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

<?php

        //$Id: hardware.class.php 7 2008-05-10 16:48:57Z lars $

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

        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;
                        }
                }
        }

?>