ich habe mal eine frage ich habe mir mein phpBB3 Forum jetzt mit pgsql installiert und wollte fragen wie ich jetzt mein script für die aktuellsten Einträge umschreiben muss damit es wieder geht
es sieht so aus (als ich noch mysql hatte^^)
<?php
$link = mysql_connect("XXX","XXX","XXX");
mysql_select_db("ttc1974");
$result = mysql_query("SELECT `topic_title`,`topic_id`,`forum_id`, `topic_last_post_time` FROM `forum_topics` ORDER BY `topic_last_post_time` DESC LIMIT 2");
while ($row = mysql_fetch_object($result))
{
if(strlen($row->topic_title) > 30){ // verkleinerung des topic titels auf maximal 30 zeichen
$topics[] = substr($row->topic_title,0,30)."...";
} else { // wenn ncith länger als 30 einfach weiter
$topics[] = $row->topic_title;
}
$topictitel[] =$row->topic_title;
$tid[] = $row->topic_id;
$fid[] = $row->forum_id;
$nn[] = date('d.m.y', $row->topic_last_post_time);
$nnb[] = date('H:i', $row->topic_last_post_time);
}
mysql_close($link);
for ($i = 0;$i < count($topics);$i++)
{
echo '<h2><a href="http://ttc1974.ath.cx/forum/viewtopic.php?f='.$fid[$i].'&t='.$tid[$i].'&sid='.session_id().'" title="'.$topictitel[$i].'">'.$topics[$i].'</h2>';
echo '<p class="demo">am '.$nn[$i].' um '.$nnb[$i].' Uhr</p>';
}
?>
würde mich freuen wenn mir jemand sagen kann wie das ganze geht =)
das forum befindet sich nun hier: ttc1974.ath.cx/phpbb3/
$result = pg_query ($dbconn, “SELECT topic_title,topic_id,forum_id,topic_last_post_time FROM forum_topics ORDER BY topic_last_post_time DESC LIMIT 2”);
while ($row = pg_fetch_object($result))
{
if(strlen($row->topic_title) > 30){ // verkleinerung des topic titels auf maximal 30 zeichen
$topics[] = substr($row->topic_title,0,30)."…";
} else { // wenn ncith länger als 30 einfach weiter
$topics[] = $row->topic_title;
}
$topictitel[] =$row->topic_title;
$tid[] = $row->topic_id;
$fid[] = $row->forum_id;
$nn[] = date(‘d.m.y’, $row->topic_last_post_time);
$nnb[] = date(‘H:i’, $row->topic_last_post_time);
}
pg_close($dbconn);
for ($i = 0;$i < count($topics);$i++)
{
echo ‘
ich habe jetzt doch noch ein problem, vlt kann mir ja jemand helfen:
das ganze zeugs beim auslesen hat nun das problem mit den umlauten ä ü ö siehe hier:
das ganze ist auf ttc1974.ath.cx includet, als ich noch mysql hatte gab es keine probleme mit den umlauten
wie kann ich das ganze wieder so machen das es auch funktioniert?^^