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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.