本文整理汇总了PHP中basis_db::db_result方法的典型用法代码示例。如果您正苦于以下问题:PHP basis_db::db_result方法的具体用法?PHP basis_db::db_result怎么用?PHP basis_db::db_result使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类basis_db
的用法示例。
在下文中一共展示了basis_db::db_result方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ort
}
}
// Reservieren
if (isset($reserve) && $raumres) {
$ort_obj = new ort();
if (!$ort_obj->load($ort_kurzbz)) {
die($p->t('lvplan/raumExistiertNicht'));
}
if (!($erg_std = $db->db_query("SELECT * FROM lehre.tbl_stunde ORDER BY stunde"))) {
die($db->db_last_error());
}
$num_rows_std = $db->db_num_rows($erg_std);
$count = 0;
for ($t = 1; $t <= TAGE_PRO_WOCHE; $t++) {
for ($j = 0; $j < $num_rows_std; $j++) {
$stunde = $db->db_result($erg_std, $j, '"stunde"');
$var = 'reserve' . $t . '_' . $stunde;
if (isset($_REQUEST[$var])) {
$datum_res = $_REQUEST[$var];
$reservierung = new reservierung();
if (!$reservierung->isReserviert($ort_kurzbz, $datum_res, $stunde)) {
if (empty($_REQUEST['titel']) && empty($_REQUEST['beschreibung'])) {
echo "<br>" . $p->t('lvplan/titelUndBeschreibungFehlt') . "! <br>";
} else {
if (empty($_REQUEST['titel'])) {
echo "<br>" . $p->t('lvplan/titelFehlt') . "! <br>";
} else {
if (empty($_REQUEST['beschreibung'])) {
echo "<br>" . $p->t('lvplan/beschreibungFehlt') . "! <br>";
} else {
$reservierung = new reservierung();
示例2: die
//echo $query;
if (!($erg = $db->db_query($query))) {
die($db->db_last_error());
}
} else {
die("Zuviele Eintraege!");
}
}
}
}
if (!($erg = $db->db_query("SELECT * FROM campus.tbl_zeitwunsch WHERE mitarbeiter_uid='{$uid}'"))) {
die($db->db_last_error());
}
$num_rows = $db->db_num_rows($erg);
for ($i = 0; $i < $num_rows; $i++) {
$tag = $db->db_result($erg, $i, "tag");
$stunde = $db->db_result($erg, $i, "stunde");
$gewicht = $db->db_result($erg, $i, "gewicht");
$wunsch[$tag][$stunde] = $gewicht;
$updateamum = $db->db_result($erg, $i, "updateamum");
$updatevon = $db->db_result($erg, $i, "updatevon");
}
if (!isset($wunsch)) {
//6-16
for ($i = 1; $i < 7; $i++) {
for ($j = 0; $j < 17; $j++) {
$wunsch[$i][$j] = '1';
}
}
}
// Personendaten
示例3:
$result_stg = $db->db_query($sql_query);
if (!$result_stg) {
echo "studiengang not found! " . $db->db_last_error() . ' line ' . __LINE__ . ' ; file ' . __FILE__ . "<br>";
}
$sql_query = "SELECT * FROM lehre.tbl_lehrfach ORDER BY kurzbz";
$result_lehrf = $db->db_query($sql_query);
if (!$result_lehrf) {
echo "lehrfach not found! " . $db->db_last_error() . ' line ' . __LINE__ . ' ; file ' . __FILE__ . "<br>";
}
$sql_query = "SELECT * FROM public.tbl_ort ORDER BY ort_kurzbz";
$result_ort = $db->db_query($sql_query);
if (!$result_ort) {
echo "ort not found! " . $db->db_last_error() . ' line ' . __LINE__ . ' ; file ' . __FILE__ . "<br>";
}
if ($result_stg && (!isset($stgid) || empty($stgid))) {
$stgid = $stgbz = $db->db_result($result_stg, 0, 'studiengang_kz');
}
$sql_query = "SELECT * FROM public.tbl_studiengang WHERE studiengang_kz={$stgid}";
$result_stgbz = $db->db_query($sql_query);
if (!$result_stgbz) {
echo "lehrfach not found! " . $db->db_last_error() . ' line ' . __LINE__ . ' ; file ' . __FILE__ . "<br>";
} else {
$stgbz = $db->db_result($result_stgbz, 0, 'kurzbz');
}
if (!isset($semester)) {
$semester = 0;
}
if (!isset($verband)) {
$verband = '0';
}
if (!isset($gruppe)) {
示例4: checkvalues
<?php
echo $p->t('zeitwunsch/help');
?>
</font>
</A>
</td>-->
<?php
echo "<h2>" . $p->t('zeitwunsch/zeitwunschVon') . " {$person->titelpre} {$person->vorname} {$person->nachname} {$person->titelpost}<br/></h2>";
echo $p->t('zeitwunsch/tragenSieInDiesesNormwochenraster') . "<br/><br/>";
echo '<FORM name="zeitwunsch" method="post" action="zeitwunsch.php?type=save" onsubmit="return checkvalues()">
<TABLE>
<TR>';
echo '<th>' . $p->t('global/stunde') . '<br>' . $p->t('global/beginn') . '<br>' . $p->t('global/ende') . '</th>';
for ($i = 0; $i < $num_rows_stunde; $i++) {
$beginn = $db->db_result($result_stunde, $i, '"beginn"');
$beginn = substr($beginn, 0, 5);
$ende = $db->db_result($result_stunde, $i, '"ende"');
$ende = substr($ende, 0, 5);
$stunde = $db->db_result($result_stunde, $i, '"stunde"');
echo "<th><div align=\"center\">{$stunde}<br>{$beginn}<br>{$ende}</div></th>";
}
echo '</TR>';
for ($j = 1; $j < 7; $j++) {
echo '<TR><TD>' . $tagbez[$lang->index][$j] . '</TD>';
for ($i = 0; $i < $num_rows_stunde; $i++) {
if (isset($wunsch[$j][$i + 1])) {
$index = $wunsch[$j][$i + 1];
} else {
$index = 1;
}
示例5: die
$var = 'wunsch' . $t . '_' . $i;
//echo $$var;
$gewicht = ${$var};
$stunde = $i + 1;
$query = "SELECT * FROM zeitwunsch WHERE lektor_id={$lkid} AND stunde_id={$stunde} AND tag={$t}";
if (!($erg_wunsch = $db->db_query($query))) {
die($db->db_last_error());
}
$num_rows_wunsch = $db->db_num_rows($erg_wunsch);
if ($num_rows_wunsch == 0) {
$query = "INSERT INTO zeitwunsch (lektor_id, stunde_id, tag, gewicht) VALUES ({$lkid}, {$stunde}, {$t}, {$gewicht})";
if (!($erg = $db->db_query($query))) {
die($db->db_last_error());
}
} elseif ($num_rows_wunsch == 1) {
$id = $db->db_result($erg_wunsch, 0, "id");
$query = "UPDATE zeitwunsch SET lektor_id={$lkid}, stunde_id={$stunde}, tag={$t}, gewicht={$gewicht} WHERE id={$id}";
if (!($erg = $db->db_query($query))) {
die($db->db_last_error());
}
} else {
die("Zuviele Eintraege fuer!");
}
}
}
?>
<html>
<head>
<title>Profil</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
示例6: die
if (!($uid = get_uid())) {
die('Sie sind nicht angemeldet. Es wurde keine Benutzer UID gefunden ! <a href="javascript:history.back()">Zurück</a>');
}
$sql_query = "SELECT titelpre, titelpost, uid, nachname, vorname FROM campus.vw_benutzer WHERE uid LIKE '{$uid}'";
//echo $sql_query;
$result = $db->db_query($sql_query);
if ($db->db_num_rows($result) == 0) {
//GastAccount
$titelpre = '';
$titelpost = '';
$uid = '';
$nachname = '';
$vornamen = '';
//echo "User not found!";
} else {
$titelpre = $db->db_result($result, 0, '"titelpre"');
$titelpost = $db->db_result($result, 0, '"titelpost"');
$uid = $db->db_result($result, 0, '"uid"');
$nachname = $db->db_result($result, 0, '"nachname"');
$vornamen = $db->db_result($result, 0, '"vorname"');
}
$sql_query = "SELECT studiengang_kz, kurzbz, kurzbzlang, bezeichnung, typ, english FROM public.tbl_studiengang WHERE aktiv ORDER BY typ, kurzbz";
$result_stg = $db->db_query($sql_query);
if (!$result_stg) {
die("Studiengang not found!");
}
$num_rows_stg = $db->db_num_rows($result_stg);
$sql_query = "SELECT ort_kurzbz, bezeichnung FROM public.tbl_ort WHERE aktiv AND lehre ORDER BY ort_kurzbz";
$result_ort = $db->db_query($sql_query);
if (!$result_ort) {
die("ort not found!");
示例7: die
echo '<link rel="stylesheet" media="print" href="../../../skin/cis.css" type="text/css">';
echo '<link rel="stylesheet" type="text/css" media="print" href="../../../skin/print.css" />';
echo '</head>';
echo '<body id="inhalt">';
}
if (!isset($begin) || !isset($ende)) {
// datum holen falls nicht gesetzt
if (!isset($_GET['semesterplan'])) {
die($p->t('global/datumNichtGesetzt') . "!");
} else {
$query = "SELECT start,ende FROM campus.tbl_studiensemester WHERE studiensemester_kurzbz=(SELECT wert FROM public.tbl_variable WHERE name='semester_aktuell' AND uid='{$uid}');";
if (!($result_semester = $db->db_query($query))) {
die($db->db_last_error());
}
if ($db->db_num_rows($result_semester) > 0) {
$begin = strtotime($db->db_result($result_semester, 0, 'start'));
$ende = strtotime($db->db_result($result_semester, 0, 'ende'));
} else {
die($p->t('global/studiensemesterKonnteNichtGefundenWerden') . '!');
}
$result_semester = $db->db_query("SELECT wert FROM public.tbl_variable WHERE uid='{$uid}' AND name='db_stpl_table';");
if ($db->db_num_rows($result_semester) > 0) {
$db_stpl_table = $db->db_result($result_semester, 0, 'wert');
} else {
die($p->t('global/userNichtGefunden') . '!');
}
}
}
if ($ende - $begin > 31536000) {
die($p->t('lvplan/datumsbereichZuGross') . "!");
}