Untitled
By: a guest | Sep 9th, 2010 | Syntax:
PHP | Size: 0.83 KB | Hits: 26 | Expires: Never
// get the title
$com_id = "SELECT com_id from travelstories WHERE story_id = ".$story." ";
$result3 = mysql_query($com_id);
while ($row2 = mysql_fetch_array($result3)) {
$com_id = $row2["com_id"];
$ts_title = "SELECT topic_title from community_topics WHERE topic_id = ".$com_id." ";
$result4 = mysql_query($ts_title);
while ($row2 = mysql_fetch_array($result4 )) {
echo $row2['topic_title'];
}
}
// get the story
$com_id = "SELECT com_id from travelstories WHERE story_id = ".$story." ";
$result5 = mysql_query($com_id);
while ($row2 = mysql_fetch_array($result5)) {
$com_id = $row3["com_id"];
$ts_story = "SELECT post_text from community_posts WHERE topic_id = ".$com_id." ";
$result6 = mysql_query($ts_story);
while ($row3 = mysql_fetch_array($result6 )) {
echo $row3['post_text'];
}
}