$what="$value"; } function field ($what) { return($this->$what); } function linkdump () { $this->error=""; $this->limit="0"; } function get ($which = 0,$limit = 0) { if (!$which) $this->query = "SELECT * FROM `links`"; else $this->query = "SELECT * FROM `links` WHERE `id` = $which"; if ($limit) $this->query .= " LIMIT $limit"; echo "gote: ".$this->query; $mysql = mysql_query($this->query) or $this->error = mysql_error(); if ($this->error) return $this->error; while ($row = mysql_fetch_assoc($mysql)) { $this->result[] = $row; //add row to array for later return } return $this->result; // return array to be cycled for caller } } ?>