SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Oct 2008
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Related Files ! Howto?

    I have a file uploader site in which i wanted to show related files in the file download page. Related files need to be calculated based on the " file name" only

    In My file table i have two fields , file_id and file_name

    eg:- 1, gods_must_be_crazy_part1.flv

    5 Related files should be shown (most matching should come first)

    eg-: Related files

    1) gods_must_be_crazy_part2.flv
    2) gods_must_be_crazy_part3.flv
    3) gods_must_be_crazy_part1.wmv
    4) godsmustbecrazy.mpg
    5) godsarenotcrazy.jpg


    Please help me how will i go about doing this in mysql/php?

  2. #2
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    your problem is thatyoud on't knowwhere the words formingthefilename are in the file name, if you see what I mean. So trying to split up the name and use parts in a set of where file_name like"%part% is tricky.


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
  •