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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:32:26+00:00 2026-05-20T00:32:26+00:00

Encountered with the following warning when trying to access the page: Warning: mysql_fetch_array(): supplied

  • 0

Encountered with the following warning when trying to access the page:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/designand/www/www/random.php on line 13

Everything was working fine when I was testing it on XAMPP.

<?php
$db_hostname = "localhost";
$db_username = "root";
$db_name = "links";
$db_pass = "xxx";


$dbh = mysql_connect ($db_hostname, $db_username, $db_pass) or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db($db_name) or die(mysql_error());

$num_displayed = 1 ;
$result = mysql_query ("SELECT * FROM 'links' ORDER BY RAND() LIMIT $num_displayed"); 
while($row = mysql_fetch_array( $result )) 

{
    echo "<a href=\"" . $row["link"] . "\"><img src=\"" . $row["image"] . "\" border=0 alt=\"\"></a>" ;
}
mysql_close($dbh);
?>
  • 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-20T00:32:28+00:00Added an answer on May 20, 2026 at 12:32 am

    An error like that almost always means there’s a problem with your query.

    To find out what error message MySQL returns, you can put or die(mysql_error()) just before the semicolon after your mysql_query call. You may also want to print the exact query text you send to MySQL, as this may help you to see the actual problem.

    Given that I don’t know how much you may have anonymized this example, I can’t be sure if this is the actual error, but it looks like you’ve surrounded your table name with apostrophes ('). This is incorrect; the correct character for escaping table and column names is `.

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

Sidebar

Related Questions

I've encountered a behavior I did not expect when executing the following Python script
I encountered the following ddl in a pl/sql script this morning: create index genuser.idx$$_0bdd0011
Has anyone encountered the following problem: I have IIS7 running on my computer. On
We've encountered the following issue. I like to use the following writing: SELECT Id,
I am debugging some code and have encountered the following SQL query (simplified version):
I encountered this term Hindley-Milner , and I'm not sure if grasp what it
I have the following interface which I'm trying to make COM-visible. When I try
I'm trying to represent the following DTD fragment in XSD:- (A | B)* |
After I recompile my project it generates a gazillion erros of the following: Warning
I'm learning C# and I encountered the following problem. I have two classes: base

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.