1

I'm trying to fetch from a MySQL Database using PHP and at the moment having no luck and I'm not sure why.

<?php 

include "base.php";

$CurrentID = 1;

$Message = mysql_query("SELECT Message FROM wall WHERE MessageID = 1");

$MessageFetch = mysql_fetch_assoc($Message);

echo $_MessageFetch['Message']

?>

Database:

alt text http://img204.imageshack.us/img204/844/screenshot20100805at013.png

1
  • 1
    When echo $Message it returns Resource ID 4 Commented Aug 5, 2010 at 0:37

1 Answer 1

2

There is an extra underscore in:

$_MessageFetch

.

echo $_MessageFetch['Message']

should be

echo $MessageFetch['Message']
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.