SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Location
    EAST COAST
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Call and display file size from SQL

    I have users upload videos to my website. And While encoding they are put in a queue, I cannot get it to pull the filesize from the SQL and display if it helps at all here is the code from that part of my index.php file
    PHP Code:
    strong>Videos Awaiting Encoding</strong>
        </td>
      </tr>
      <? 
      $result 
    mysql_query("SELECT content.* FROM content, encoding_queue WHERE encoding_queue.executed = 0 AND encoding_queue.id = content.record_num");
      while(
    $row mysql_fetch_array($result)) 
          {
      
    ?>
    And this below is the rows in my encoding queue table.
    id timestamp executed record_num[

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Where in the database is the filesize stored and what problem are you having selecting it?

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Location
    EAST COAST
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I do not see a spot where it is stored. I am new to SQL and I cant figure it out. The problem is I bought this script and noticed a few small bugs im trying to fix

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    How do you know it's being stored at all? If it's not in the database, you can't query for it from the database.

  5. #5
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Location
    EAST COAST
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont it just looks to me like the php file calls to the database for it. That is why I included the code I was hoping someone could shed some light on this for me.

  6. #6
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The code you included selects all columns from the content table that match rows in the queue. That code doesn't show anyone what those columns are, what's in the database, or what the page is doing with what it selected from the database.

    I am going to take a guess that if you want to show the file size of the uploaded videos, you need to figure out where they're stored and use filesize on the file to figure it out and display it.

  7. #7
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Location
    EAST COAST
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    looks like this is going to take a little more work than I imagined.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •