problem with mysql_fetch_assoc()
Posted: Wed Mar 25, 2009 7:05 am
hi i'm having a problem with mysql_fetch_assoc() saying:
my view.html is this:
i can't figure out where is mistake. where is my mistake is or did i miss something. if you know. help please
Code: Select all
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/a1791845/public_html/view.html on line 21Code: Select all
<html>
<head></head>
<link href="dirty money.css" rel="stylesheet" type="text/css">
<body>
<div id="wrapper">
<div id="header"></div>
<div id="navigation">
<p id="menu">
<a href="last.php">Oxirgi kiritilganlar</a> <a href="add.html">Kirit</a> <a href="chat.php">Chat</a> <a href="themes.php">Temalar</a> <a href="titles.html">So`zlarni ko`rish</a>
</p>
</div>
<div id="leftcolumn">leftcol</div>
<div id="content">
<p id="main">
<?PHP
$connection = mysql_connect("host", "user", "********") or die(mysql_error());
mysql_select_db("a1791845_jargon") or die(mysql_error());
$title = "SELECT title.word, words.title, words.id * FROM words, title WHERE title.word = words.title";
$result = mysql_query($title, $connection);
while($row = mysql_fetch_assoc($result)){
?>
<a href="exam.php?id=<?PHP echo $row['id']; ?>"><?PHP echo $row['word']; ?></a>
<?PHP } ?>
</div>
<div id="footer">footer</div>
</div>
</body>
</html>