Problem Datenbank abfrage Liste ausgeben...
Verfasst: 25.06.2009 12:38
Hallo zusammen,
habe da schon wieder ein ekelhaftes Problem... nach tausend versuchen, vergleichen mit anderen MODS hier und auf .com komme ich einfach nicht drauf...
Was mach ich falsch?
Ich will einfach eine Liste an daten in einer Tabelle ausgeben...
Dafür habe ich folgendes in der .php im root
und dies im theme body:
Im Moment endet alles, und egal was ich versuche mit einer weissen Seite...
Ich wäre euch für eure Antwort echt danbar...
habe da schon wieder ein ekelhaftes Problem... nach tausend versuchen, vergleichen mit anderen MODS hier und auf .com komme ich einfach nicht drauf...
Was mach ich falsch?
Ich will einfach eine Liste an daten in einer Tabelle ausgeben...
Dafür habe ich folgendes in der .php im root
Code: Alles auswählen
// Get unit data
$sql = "SELECT *
FROM " . TVP_UNIT_TABLE . "
ORDER BY tvp_unit_id';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$template->assign_block_vars('entryloop', array(
'TITEL' => $row['tvp_unit_titel'],
'DATE' => $row['tvp_unit_date'],
'DURATION' => $row['tvp_unit_duration'],
'DISTANZ' => $row['tvp_unit_distanz'],
'HM' => $row['tvp_unit_hm'],
'ORT' => $row['tvp_unit_ort'],
'AKTGEW' => $row['tvp_unit_aktgew'],
'TEMP' => $row['tvp_unit_temp'],
'NOTIZ' => $row['tvp_unit_notiz'],
'BMI' => $row['tvp_unit_bmi'],
));
}
$db->sql_freeresult($result);
// Get unit data end
Code: Alles auswählen
<!-- INCLUDE overall_header.html -->
<h2>{L_TVP_TITLE}</h2>
<div class="forumbg">
<div class="inner"><span class="corners-top"><span></span></span>
<div style="text-align: center;">
<input class="button1" type="button" onclick="window.location.href='{U_TVP}'" value="{L_U_TVP}" />
<input class="button1" type="button" onclick="window.location.href='{U_TVP_REG}'" value="{L_U_TVP_REG}" />
<input class="button1" type="button" onclick="window.location.href='{U_TVP_UNIT}'" value="{L_U_TVP_UNIT}" />
<input class="button1" type="button" onclick="window.location.href='{U_TVP_ENTRY}'" value="{L_U_TVP_ENTRY}" />
<input class="button1" type="button" onclick="window.location.href='{U_TVP_FORUM}'" value="{L_U_TVP_FORUM}" />
<br/>
<br/>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
<div class="forumbg">
<div class="inner"><span class="corners-top"><span></span></span>
<table class="table1" cellspacing="1">
<tbody>
<tr class="row3">
<td>{L_E_TITEL}</td>
<td>{L_E_DATS}</td>
<td>{L_E_DURATION}</td>
<td>{L_E_DISTANZ}</td>
<td>{L_E_HM}</td>
<td>{L_E_ORT}</td>
<td>{L_E_AKTGEW}</td>
<td>{L_E_TEMP}</td>
<td>{L_E_NOTIZ}</td>
<td>{L_E_BMI}</td>
</tr>
<!-- BEGINN entryloop -->
<tr class="<!-- IF entryloop.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
<td>{entryloop.TITEL}</td>
<td>{entryloop.DATS}</td>
<td>{entryloop.DURATION}</td>
<td>{entryloop.DISTANZ}</td>
<td>{entryloop.HM}</td>
<td>{entryloop.ORT}</td>
<td>{entryloop.AKTGEW}</td>
<td>{entryloop.TEMP}</td>
<td>{entryloop.NOTIZ}</td>
<td>{entryloop.BMI}</td>
</tr>
<!-- END entryloop -->
</tbody>
</table>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- INCLUDE overall_footer.html -->
Ich wäre euch für eure Antwort echt danbar...