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

  • Home
  • SEARCH
  • 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 7877181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:17:44+00:00 2026-06-03T03:17:44+00:00

My question is how to remove the error, message saying mysql_fetch_object(): supplied argument is

  • 0

My question is how to remove the error, message saying

mysql_fetch_object(): supplied argument is not a valid MySQL result.

I need to throw/catch this error, but not sure how to do this.

When this function has a result to return, it works properly.

It is just that when when the result returns null, it says supplied argument is not a valid mysql result.

So how do I remove this error, so when it doesn’t have anything to return, instead of displaying mysql_fetch_object(): supplied argument is not a valid MySQL result, it shows the user what I want.

$posts = show_allgroupsposts1($myusers,5);
if (count($posts)){
do a bunch of stuff.
}else{
nothing to display.
}
?>

currently, it returns:

mysql_fetch_object(): supplied argument is not a valid MySQL result
nothing to display.
  • 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-03T03:17:45+00:00Added an answer on June 3, 2026 at 3:17 am

    You should check wither the result variable is false.

    if($result)
        mysql_fetch_object();
    else
        ...do nothing
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

dont worry it is not an another how to remove index.php from url question!!
I was looking at this question: How to remove duplicate elements from an xml
Question How do I remove class attributes from html using python and lxml? Example
I have a simple question how do I remove a \ with regex? Thanks
This is a simple question How do you remove the space between the content
At this question: mod rewrite to remove file extension, add trailing slash, remove www
My question is simple. Should I remove Log.d/e/i/v and e.printStackTrace instructions before uploading my
Hopefully there's a quick and dirty way to remove the Ask Question (or hide
We currently has a page that is used to display a generic error message
I am using a YUI Tooltip to show an error message when users mouse

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.