Location: PHPKode > projects > PHP-OS > PHP-OS BetaV2/generateWindow.php
<?php
$windowsSQL=mysql_query("SELECT * FROM windows");
$windowsAnzahl=mysql_num_rows($windowsSQL);
$found=0;
$searchid=0;

while($windowsAnzahl!=$found){
$searchid++;
$windowsWhileSQL=mysql_query("SELECT * FROM windows WHERE ID = '".$searchid."'");
$windowsRow=mysql_fetch_array($windowsWhileSQL);
if($windowsRow[ID]!=''){
echo'
<div id="'.$windowsRow[openID].'">'.$windowsRow[content].'</div>';
$found++;
}

}
//Eigene Fenster
$windowsSQL=mysql_query("SELECT * FROM ownwindows");
$windowsAnzahl=mysql_num_rows($windowsSQL);
$found=0;
$searchid=0;

while($windowsAnzahl!=$found){
$searchid++;
$windowsWhileSQL=mysql_query("SELECT * FROM ownwindows WHERE ID = '".$searchid."'");
$windowsRow=mysql_fetch_array($windowsWhileSQL);
if($windowsRow[ID]!=''){
echo'
<div id="own'.$windowsRow[openID].'">'.$windowsRow[content].'</div>';
$found++;
}

}

//Programme
$windowsSQL=mysql_query("SELECT * FROM programms");
$windowsAnzahl=mysql_num_rows($windowsSQL);
$found=0;
$searchid=0;

while($windowsAnzahl!=$found){
$searchid++;
$windowsWhileSQL=mysql_query("SELECT * FROM programms WHERE ID = '".$searchid."'");
$windowsRow=mysql_fetch_array($windowsWhileSQL);
if($windowsRow[ID]!=''){

echo'
<div id="'.$windowsRow[name].'"></div>';
$found++;
}

}

Return current item: PHP-OS