Queries …

function count ($sqllink,$dealer,$region,$marke)
	SELECT count(*) AS count FROM haendler,regionen WHERE 1=1 AND regionen.haendler=haendler.id AND regionen.region='$region'  AND firma LIKE '%$dealer%' ORDER BY firma
 
function load2($sqllink,$first,$count,$page,$buchstaben_count, $order="id",$dealer,$region,$marke)
	SELECT * FROM  haendler,regionen  AND regionen.haendler=haendler.id AND regionen.region='".$region." AND $order LIKE '%$dealer%' ORDER BY $order

getDatum – ultra extended version

Schaltjahr?! I don’t care! :)

	public function getDatum()
	{
		$select=$this->registry->dbAdapter->select()
		->from('updates')  ;
		$row=$select->query()->fetch();
		//für Datum
		if($row['zaehler']<=31){
			$monat="Januar";
			$tag=$row['zaehler'];
		}
		elseif($row['zaehler']<=59 && $row['zaehler']>31){
			$monat="Februar";
			$tag=($row['zaehler']-31);
		}
		elseif($row['zaehler']<=90 && $row['zaehler']>59){
			$monat="März";
			$tag=($row['zaehler']-59);
		}
		elseif($row['zaehler']<=120 && $row['zaehler']>90){
			$monat="April";
			$tag=($row['zaehler']-90);
		}
		elseif($row['zaehler']<=151 && $row['zaehler']>120){
			$monat="Mai";
			$tag=($row['zaehler']-120);
		}
		elseif($row['zaehler']<=181 && $row['zaehler']>151){
			$monat="Juni";
			$tag=($row['zaehler']-151);
		}
		elseif($row['zaehler']<=212 && $row['zaehler']>181){
			$monat="Juli";
			$tag=($row['zaehler']-181);
		}
		elseif($row['zaehler']<=243 && $row['zaehler']>212){
			$monat="August";
			$tag=($row['zaehler']-212);
		}
		elseif($row['zaehler']<=273 && $row['zaehler']>243){
			$monat="September";
			$tag=($row['zaehler']-243);
		}
		elseif($row['zaehler']<=304 && $row['zaehler']>273){
			$monat="Oktober";
			$tag=($row['zaehler']-273);
		}
		elseif($row['zaehler']<=334 && $row['zaehler']>304){
			$monat="November";
			$tag=($row['zaehler']-304);
		}
		elseif($row['zaehler']<=365 && $row['zaehler']>334){
			$monat="Dezember";
			$tag=($row['zaehler']-334);
		}
		return("<input type='hidden' class='date' value='".$tag.". ".$monat."' readonly='readonly' />");
	}