chico1st Posted August 18, 2006 Share Posted August 18, 2006 Hey im having trouble with a join, as far as i can figure it should work but i get:[b]Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\wamp\www\Lib.php on line 206[/b]this worked fine before i tried to join it so i think that must be the problem[b]$query = "SELECT news.newsID, news.pictureID, news.dateID, news.name, news.abstract, date.dateID, date.name " . "FROM news, date WHERE news.dateID = date.dateID ORDER date.name";[/b]$result = mysql_query($query, $dbConn); //print 2 most recent news articles for( $i = 0; $i <2; $i++){ $output .= "\n<tr><td>"; $row = mysql_fetch_assoc($result); $news_id = $row['news.newsID']; $name = $row['news.name']; $abstract = $row['news.abstract']; $image_id = $row['news.pictureID']; ....any help you can offer would be GGGGGRRREEAT! Quote Link to comment Share on other sites More sharing options...
manmadareddy Posted August 18, 2006 Share Posted August 18, 2006 I think mysql is treating date as keyword or function. Please check Quote Link to comment Share on other sites More sharing options...
fenway Posted August 18, 2006 Share Posted August 18, 2006 Perhaps... also, you should write JOINs using the proper syntax, without using the comma operator. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.