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! Link to comment https://forums.phpfreaks.com/topic/17911-join-syntax/ 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 Link to comment https://forums.phpfreaks.com/topic/17911-join-syntax/#findComment-76575 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. Link to comment https://forums.phpfreaks.com/topic/17911-join-syntax/#findComment-76820 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.