I am getting an error, Call to undefined function connect(). I can't figure out why, can you help? The error is coming from the getAll function
public function connect(){
if(!mysql_connect("localhost","root","pw"))
{
echo "<h2>".$TEXT['rednote-error']."</h2>";
die();
}
mysql_select_db("bikesite");
}
public function getAll(){
connect();
$this->collection = new Collection();
$result=mysql_query("SELECT * FROM customer ORDER BY name;");
$i=0;
while( $row=mysql_fetch_array($result) )
{
//add to the test collection
$m = new Media($row['interpret'], $row['titel'], $row['jahr'], "tracks1", "0", "10", "bar1", "1");
$m->id = $row['id'];
$this->collection->add($m);
$i++;
}
return $this->collection;
}