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 7530259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:51:47+00:00 2026-05-30T04:51:47+00:00

Possible Duplicate: How do i echo a Resource id #6 from a MySql response

  • 0

Possible Duplicate:
How do i “echo” a “Resource id #6” from a MySql response in PHP?

I have a statement:

      $query1 = mysql_query("SELECT COUNT(author) FROM userpages WHERE `author` = '" . $userid . "'") or die();
      echo $query1;

Ignore the amazingly awful naming convention their, its just for testing it before i beef it up. Because im not actually getting data from the table i should just be able to echo the statement shouldnt i? However its giving me an error.

The error is: Resource id #4

Any advice?

Thanks.

  • 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-05-30T04:51:49+00:00Added an answer on May 30, 2026 at 4:51 am

    http://www.php.net/manual/en/function.mysql-query.php

    Returned values:

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

    And:

    The returned result resource should be passed to mysql_fetch_array(),
    and other functions for dealing with result tables, to access the
    returned data.

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

Sidebar

Related Questions

Possible Duplicate: How do i echo a Resource id #6 from a MySql response
Possible Duplicate: How do i echo a Resource id #6 from a MySql response
Possible Duplicate: How to call a JavaScript function from PHP? I have a php
Possible Duplicate: How to create comma separated list from array in PHP? I have
Possible Duplicate: Reference: Comparing PHP's print and echo Is there any major and fundamental
Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select Here's
Possible Duplicate: get image from base64 string I tried header('Content-Type: image/png'); echo base64_decode($data);` But
Possible Duplicate: php echo vs open&close tag For example. Is this: <p>Hello welcome to
Possible Duplicate: Error when echo $_GET[“jsoncallback”] <select name=test> <option value=1>1</option> <option value=2>2</option> <option value=3>3</option>
Possible Duplicate: Why does PHP echo'd text lose it's formatting? I got strange problem.

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.