Results 1 to 3 of 3

Thread: retrieve files

  1. #1
    Join Date
    Mar 2007
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default retrieve files

    hi..
    my problem is tht i hv a form which uploads resumes for a folder called uploads.it also changes the name and stores it so tht 2 resemes dont get over written if de have the same name. i now need to retrieve resumes automatically given a search criteria. for example if the admin wants resumes of all candidates who score abv 75%,by enterin this value de can get all such resumes.
    can any1 tell mehow to do it
    thanks in advance
    suk

  2. #2
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    If the results are stored in an array...
    PHP Code:
    <?php
    function sort_by_percent ($ar$pe) {
      
    $rad = array();
      foreach (
    $ar as res) {
        if (
    $res[0] => $pe) {
          
    $rad[] = $res;
        }
      }
      return 
    $rad;
    }
    $array = array(
    array(
    "score","name","position""etc"),
    array(
    "score","name","position""etc"),
    array(
    "score","name","position""etc")
    );
    //Call it like this:
    sort_by_percent ($array"0.75");
    // returns an array where scores are higher than the decimal.
    ?>
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It would be best to store information about the files in a database here. Then you could just do
    Code:
    select from files where score > 0.75;
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •