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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:25:25+00:00 2026-05-17T17:25:25+00:00

Hell there when i try and connect to pull thing out of the database

  • 0

Hell there
when i try and connect to pull thing out of the database i get the following error:

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/content/49/5548763/html/matt/download.php on line 17

None of the other answers on this site worked.

here is the script:

<?php

$con = mysql_connect("XXXX", "name", "password");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

$db_selected = mysql_select_db("nameofdb",$con);

$musictable = "";

$sql = "GET * FROM matt";

$result = mysql_query($sql,$con);

while($row = mysql_fetch_object($result)) {

$id = $row->id;

$name = $row->name;

$update = $row->update;

$length = $row->length;

$size = $row->size;

$musictable .= "
  <tr>
    <td width=\"63%\">".$name."</td>
    <td width=\"10%\">".$length." / ".$size."</td>
    <td width=\"10%\"><a href=\"download.php?mp3=".$name."\">DOWLOAD</a></td>
    <td width=\"17%\">|||||</td>
  </tr>
  ";
}

?>
  • 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-17T17:25:26+00:00Added an answer on May 17, 2026 at 5:25 pm

    That’s because your query is wrong.

    $sql = "GET * FROM matt";
    

    must probably become

    $sql = "SELECT * FROM matt";
    

    the basic measure to get warned about this is

    if (!$result)
     die("mySQL error: ". mysql_error());  
    

    after issuing a query.

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

Sidebar

Related Questions

We are using PowerDesigner at work for database modelling. But there is a hell
Microsoft seems hell-bent on deprecating the swiss-army-knife of database tools. What else comes close
I've read that compound primary keys will confuse the hell out of typical ORM
Just wondered if there was a secret to do something like Database.Security.Users like AdventureWorks
What is classpath hell and is/was it really a problem for Java?
I'm having a hell of a time understanding pointers in Objective C. They don't
I wonder, why the hell... did the VS team consider that NOT finding a
I mean, I always was wondered about how the hell somebody can develop algorithms
I'm interested in people's opinions on the pros and cons, or downright hell no's
We are sending hell lot of e-mails to our BREW devices ( in sprint

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.