Subversion-Projekte lars-tiefland.inventar

Revision

Revision 7 | Revision 20 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 7 Revision 10
Zeile 1... Zeile 1...
1
<?php
1
<?php
Zeile 2... Zeile 2...
2
 
2
 
Zeile 3... Zeile 3...
3
	//$Id: hardware.class.php 7 2008-05-10 16:48:57Z lars $
3
	//$Id: hardware.class.php 10 2008-05-10 21:47:24Z lars $
4
 
4
 
5
	/**
5
	/**
6
	 * @package	Inventar Datenbank
6
	 * @package	Inventar Datenbank
Zeile 16... Zeile 16...
16
 
16
 
17
		function __construct($id=0)
17
		function __construct($id=0)
18
		{
18
		{
19
			if($id)
19
			if($id)
20
			{
20
			{
21
				$res=$GLOBALS["db"]->query("SELECT * FROM hardwares WHERE id=$id");
21
				$res=$GLOBALS["db"]->query("SELECT * FROM hardware WHERE id=$id");
22
				$this->id=$id;
22
				$this->id=$id;
23
				$row=$res->fetchRow();
23
				$row=$res->fetchRow();
-
 
24
				$this->name=$row["name"];
24
				$this->name=$row["name"];	
25
				$this->type_id=$row["type_id"];	
25
			}	
26
			}	
26
			else
27
			else
27
			{
28
			{
28
				$this->id=0;
29
				$this->id=0;