
wo und wie schau ich da nach?
Code: Alles auswählen
Field Type Attributes Null Default Extra
post_subject varchar(60) Yes NULL
Code: Alles auswählen
#
#-----[ FIND ]---------------------------------------------
#
//Begin Last Post in Profile
$sql = 'select pt.post_subject,pt.post_id,p.topic_id from ' . POSTS_TABLE .
' p,' . POSTS_TEXT_TABLE . ' pt where pt.post_id=p.post_id and p.poster_id=' . $profiledata['user_id'] .
' order by p.post_time limit 1';
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain users post information.", '', __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
$currentpost = $row['post_subject'];
$currentpostid=$row['post_id'];
$currenttopicid=$row['topic_id'];
}
$db->sql_freeresult($result);
//Ende Last Post in Profile
#
#-----[ REPLACE WITH ]---------------------------------------------
#
//Begin Last Post in Profile
$sql = 'select t.topic_title,pt.post_id,p.topic_id from ' . POSTS_TABLE .
' p,' . POSTS_TEXT_TABLE . ' pt,' . TOPICS_TABLE . ' t where pt.post_id=p.post_id and p.topic_id=t.topic_id and p.poster_id=' . $profiledata['user_id'] .
' order by p.post_time limit 1';
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain users post information.", '', __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
$currentpost = $row['topic_title'];
$currentpostid=$row['post_id'];
$currenttopicid=$row['topic_id'];
}
$db->sql_freeresult($result);
//Ende Last Post in Profile
bäh.) ersetzt du dasATARI hat geschrieben:ah..?!
Code: Alles auswählen
order by p.post_time limit 1';
Code: Alles auswählen
ORDER BY p.post_time DESC LIMIT 0,1';