mirror of
https://gitlab.com/harald.mueller/aktuelle.kurse.git
synced 2024-11-24 10:41:56 +01:00
40 lines
772 B
PHP
40 lines
772 B
PHP
|
<?
|
||
|
#bindet "inc.db_open.php" ein
|
||
|
|
||
|
#macht Abfrage auf tabelle "Jobs",erzeugt
|
||
|
#HTML-Tabelle und gibt die Tabelle aus
|
||
|
|
||
|
include("inc.db_open.php");
|
||
|
|
||
|
$db_connection = open_db();
|
||
|
|
||
|
$sql = "SELECT l_Id,str_Jobtitel FROM Jobs";
|
||
|
|
||
|
|
||
|
$result = mysql_query($sql, $db_connection) or die("Invalid query");
|
||
|
$num_rows = mysql_num_rows($result);
|
||
|
if ($result) {
|
||
|
|
||
|
if($num_rows==0){
|
||
|
echo "Derzeit keine Job-Angebote.";
|
||
|
}else{
|
||
|
echo "<ul>\n";
|
||
|
|
||
|
while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
|
||
|
echo "<li>\n";
|
||
|
echo "<a href='job_popup.php?job=".$row["l_Id"]."' onClick='openJob(".$row["l_Id"].");return false;'>";
|
||
|
echo htmlentities($row["str_Jobtitel"]);
|
||
|
echo "</a>\n";
|
||
|
echo "</li>";
|
||
|
}
|
||
|
echo "</ul>\n";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
mysql_close($db_connection);
|
||
|
?>
|
||
|
|
||
|
|
||
|
</body>
|
||
|
</html>
|