Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7981581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:25:15+00:00 2026-06-04T10:25:15+00:00

I have following code.. $query = SELECT quote, author FROM quotes ORDER BY id

  • 0

I have following code..

$query = "SELECT quote, author FROM quotes ORDER BY id DESC";
$resut = mysql_query($query, $connection) or die(mysql_error());

echo $result; //for debuggin purpose

while($result_set =  mysql_fetch_array($result)) {      
    echo '<div class="pullquote">';
    echo $result_set['quote'];
    echo ' - ';
    echo $result_set['author'];
    echo '</div>';
}

and this doesn’t works! The table is not empty FYI, all I see in the output is:

Resource id #9

I am not being able to figure out what this Resource id #9 means.
As I tested SELECT quote, author FROM quotes ORDER BY id DESC in phpmyadmin, that just works fine and produces desired result, but not in here. I wonder what is wrong with the code or something?

If I do following,

$array = mysql_fetch_assoc($result);
var_dump ($array);

It returns, bool(false). What does that mean here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T10:25:17+00:00Added an answer on June 4, 2026 at 10:25 am

    What is a "Resource"?

    There’s nothing wrong with Resource id #9 (this just means you have a resource). Note the documentation on this topic:

    For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset, mysql_query() returns a resource on success, or FALSE on error.

    So if you have "Resource," it means your query didn’t fail.

    Watch for Typos

    Additionally, you are setting $resut, and attempting to access $result. Note the missing "l".

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: (query added) $weight_table = mysql_query (SELECT * FROM .$prefix.weight
I have the following code: $query = mysql_query(SELECT * FROM mytable); while($row = mysql_fetch_assoc($query)){
I have the following code $result = $handle->select()->from('store_details') ->where('store_details.store_id=?', $id) ->columns('store_details.store_name'); //->query(ZEND_DB::FETCH_OBJ); However, when
I have the following code: mysql_query(SELECT * FROM list WHERE name LIKE '%'$searchTerm'%' OR
I have the following code: $mostRecent = mysql_query(SELECT couponID FROM users_coupons WHERE userID =
Ok, I have the following code: $array = mysql_query(SELECT artist FROM directory WHERE artist
I have the following code: if ($user) { $highscore = mysql_result(mysql_query(SELECT Score FROM HighScore
I have table that I insert data with following query (from c# code): INSERT
I have the following query: SELECT t.*, a.hits AS ahits FROM t, a WHERE
I have the following query in sql: SELECT a1 FROM dbo.myProductNames WHERE keycode =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.