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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:40:55+00:00 2026-05-25T00:40:55+00:00

I am trying to get the direct path of the $result below: $query=SELECT videoid

  • 0

I am trying to get the direct path of the $result below:

$query="SELECT videoid from blabla";
$result=mysql_query($query);
$destination="ftp:/.../";

I am trying to get the direct path of the videoid which is in $result so i can send all the actual video files to an ftp.

So far I have:

ftp_put ($connection,$destination,$result,FTP_ASCII);

When I run it it says that the source has to be a string or something like that.

  • 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-25T00:40:56+00:00Added an answer on May 25, 2026 at 12:40 am

    $result is not the field your are looking for, you have to fetch the data from the $result. Note the mysql_fetch_assoc call which pulls data out of the query result.

    Here is an example from the mysql_query documentation

    // Formulate Query
    // This is the best way to perform an SQL query
    // For more examples, see mysql_real_escape_string()
    $query = sprintf("SELECT firstname, lastname, address, age FROM friends WHERE firstname='%s' AND lastname='%s'",
        mysql_real_escape_string('fred'),
        mysql_real_escape_string('fox'));
    
    // Perform Query
    $result = mysql_query($query);
    
    // Check result
    // This shows the actual query sent to MySQL, and the error. Useful for debugging.
    if (!$result) {
        $message  = 'Invalid query: ' . mysql_error() . "\n";
        $message .= 'Whole query: ' . $query;
        die($message);
    }
    
    // Use result
    // Attempting to print $result won't allow access to information in the resource
    // One of the mysql result functions must be used
    // See also mysql_result(), mysql_fetch_array(), mysql_fetch_row(), etc.
    while ($row = mysql_fetch_assoc($result)) {
        echo $row['firstname'];
        echo $row['lastname'];
        echo $row['address'];
        echo $row['age'];
    }
    
    // Free the resources associated with the result set
    // This is done automatically at the end of the script
    mysql_free_result($result);
    

    You can therefore modify your code as follows:

    $query="SELECT videoid from blabla";
    $result=mysql_query($query);
    
    if (!$result) {
        $message  = 'Invalid query: ' . mysql_error() . "\n";
        die($message);
    }
    
    while ($row = mysql_fetch_assoc($result)) {
        // loop through every videoid returned, ftp each individually
        ftp_put ($connection,$destination,$row['videoid'],FTP_ASCII);
    }
    mysql_free_result($result);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So i am trying get 2 div-containers which both should contain centered text (Both
I'm trying get the visible portion of UIImage from an UIImageView . UIImageView takes
I'm having the following problem when trying to get the path of a given
I'm trying to get jQuery to take the hashtag from a URL and do
I'm trying to get all the direct reports of a User through Active Directory,
Ive been trying to get my app to change from one scene to another.
I'm trying, desperately, to get into C++ programming with DirectX. It's been a steep
I am trying get all html links within a string and replace them using
I am trying get all html links within a string and replace them using
I am trying get Struts 2 and Tiles to work and I am using

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.