homepage Welcome to WebmasterWorld Guest from 54.211.157.103
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

    
Sql Relationship problem
infernofiasco




msg:965339
 5:10 pm on Jan 28, 2004 (gmt 0)

Iam tryin to place a live forum update colom on my page using php.

From using a yabbse board it has left me with numerous tables in my database.

By using 1 of the tables iam able to get the right url: But i need to reference it with another table so i can the subject correct aswell:

$dbcnx = @mysql_connect('localhost', 'root', '');
if (!$dbcnx) {
die( '<p>Unable to connect to the ' .
'database server at this time.</p>' );
}


if (! @mysql_select_db('yabb') ) {
die( '<p>Unable to locate the Yabbse ' .
'database at this time.</p>' );
}

$sql = "SELECT * FROM yabbse_topics ORDER BY ID_FIRST_MSG DESC";

$result=mysql_query($sql);

$num=mysql_numrows($result);

$i=0;
while ($i < 4) {

$boardId=mysql_result($result,$i,"ID_BOARD");
$msgId=mysql_result($result,$i,"ID_FIRST_MSG");
$topID=mysql_result($result,$i,"ID_TOPIC");

echo "<a href=http://www.%%%%%%.co.uk/yabbse/index.php?board=$boardId;action=display;threadid=$topID>Forum Subject: $boardId</a><br>";

++$i;
}
?>

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved