Jump to content

join syntax


chico1st

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.