Sorry but i'm gone crazy!
I have written a code but it doesn't work, so waht shall i do?
look at this *beep* code:
- Code: Select all
<?php
include("includes/config_publications.inc.php");
include("$p_includes/functions.main.php");
print_header("Beitragsübersicht");
$select = "FROM $dbn_c
WHERE c_status='active'";
if ($searchquery)
$sql_query = build_sql_query($searchquery, $dbn_c);
if ($sql_query)
$select .= " AND ($sql_query)";
if ($cat_id) {
if ($cat_id == "de") {
$select .= " AND (
c_cat_id='7' OR
c_cat_id='8' OR
c_cat_id='9' OR
c_cat_id='10' OR
c_cat_id='11' OR
c_cat_id='12')";
} elseif ($cat_id == "en") {
$select .= " AND (
c_cat_id='19' OR
c_cat_id='20' OR
c_cat_id='21' OR
c_cat_id='22' OR
c_cat_id='23' OR
c_cat_id='24')";
} else {
$select .= " AND c_cat_id='$cat_id'";
}
}
$query = mysql_db_query($db_name, "SELECT COUNT(*) $select") or print_error(mysql_error());
$hits = ($query>0) ? mysql_result($query,0,0) : "0";
list($navi, $limit) = explode("#",build_site_nav($hits));
$sql = "SELECT *
$select
ORDER BY c_timestamp DESC
$limit";
rem($sql);
$query = mysql_db_query($db_name, $sql) or print_error(mysql_error());
?>
<form method="GET" name="searchform">
<input type="hidden" name="cat_id" value="<?=$cat_id?>">
<p align="center">
Beiträge nach <input type="text" name="searchquery" size="20">
<input type="submit" value="durchsuchen">
</p>
</form>
<?php
while ($row = mysql_fetch_array($query)) {
?>
<table width="680" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#57798a">
<td colspan="2"><span class="Stil6"><?=$row[author]?></span></td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2"><span class="Stil13"><?=$row[title]?></span></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="left" class="Stil11"> <?=$row[p_place]?></td>
<td align="right" class="Stil11"><?=$row[publication]?></td>
</tr>
</table>
<?php
}
print "<p align=center>$navi</p>";
print_footer();
?>
So my Problem is, i know that the pc has an realationshio to mysql, but he don't show me any things out of my table in my database!
So please help me, i can understand German but i'm not in good in writing German!
by KB