Jump to content

Newbie With most likely a simple question!


ThaWorm

Recommended Posts

I am working out of a book and I'm trying to run this code.

 

$result = mysql_query($sql);

$row = mysql_fetch_assoc($result);

echo "

. "'>" . $row['subject'] .

"

?

";

echo "In

."'>" . $row['cat'] .

"

- posted on " . date("D js F Y " ,

strtotime($row['dateposted'])) .

"";

echo "

";

echo nl2br($row['body']);

echo "

";

 

 

When I do I get this error

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource

 

Can anyone help me out here. Also thanks in advance.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...