Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    May 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need script/program [Paying!]

    Hi guys,

    I've came to a problem, I have my members details in two .txt files.

    1.txt and 2.txt

    1.txt containing there name and 2.txt containing there address.

    Each line in the txt file ends with there 13 digit membership number.

    So what I've been doing is copying the membership number from 1.txt and searching 2.txt to match the name to the correct address.

    I need some sort of script in which i can paste all membership numbers 1 per line and combine the lines together. For example:

    I list the membership numbers.
    I load 1.txt and 2.txt

    123456789 being the first membership number to process.

    Joe Soap 123456789 is found in 1.txt
    11 Bubble Bath Lane 12356789 is found in 2.txt

    Output.txt -> Joe Soap 123456789 11 Bubble Bath Lane 12356789


    If anyone has the idea of what i need done here and your capable of doing it, im willing to pay for this sort of script.

    It doesnt need to be in java.

    I can't do this manually since there is thousands.

    Please reply with your skype/msn/messenger if you can do this we will talk about a price.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,650
    Thanks
    80
    Thanked 4,636 Times in 4,598 Posts
    Well, the *RIGHT* answer is to stop using text files! That might have been an okay answer when you had a handful of members, but once you got to even 100 or so it was past time to start using a database.

    And that means writing server-side code: PHP or ASP or JSP.

    You *can* do this with text files on the server and using JavaScript, but it's a really bad solution. It's also very very insecure, because anybody with a JavaScript debugger (which means anyone with a browser!) can intercept your data and read your ENTIRE membership list, with addresses. How do you think your members would feel about you exposing their name and address to the ENTIRE WORLD?

    If I found you were doing this, I might be tempted to sue you for breach of privacy.

    With a server-side solution, you still might show member's addresses to other members, but at least you'd be able to ensure that *ONLY* members can see the data. You have no such protection in an all HTML/JavaScript system.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,310
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    Quote Originally Posted by JobNeedsDone View Post
    It doesnt need to be in java.
    This is the JavaScript forum. Java and Javascript are entirely different programming languages, in spite of the confusingly similar names. Rather like Austria and Australia!

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Flint, Michigan, USA
    Posts
    632
    Thanks
    1
    Thanked 21 Times in 21 Posts
    Do you need this merge to be done every time someone references your data, or do you need those files merged once and you would then use that single result file each time?

    If you wish to maintain those two base files separately forever, the only good answer is a database. If you wish to merge them once and then use that result, the best answer still might be a database, but done much differently.

    PM me and we'll talk.

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Looks like they got what they wanted already in this thread.

    http://www.codingforums.com/showthre...05#post1231105

    Curious to see if the person who gave them the code gets paid.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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