Re: PHP/MYSQL Question...

From: Armando Padilla (mando81_at_prodigy.net)
Date: 10/05/04

  • Next message: Frankenstein: "funcions using get/post/session/array"
    Date: 5 Oct 2004 10:32:56 -0700
    
    

    Hi, dont know if you got your answer but the best way to go about this
    is maybe:

    1) Write a script to browse the folder you are working on.
    2) Detect the file and open.
    3) Once in the file, for each line explode the string by "/" <- is the
    delimeter you are using in this case it was a /. The explode function
    in php will give you an array of elements which you can loop through
    and throw them into a table.

    That is a good start.

    Armando Padilla
    http://www.armando.ws

    don@donnybravos.com (Webmaster) wrote in message news:<dfbb4f0d.0409110217.608eebca@posting.google.com>...
    > Hi everyone...
    >
    > I have a directory of text files that i'd like to import into a msql
    > table... I was wondering if there's an easier way to do this with
    > php/mysql, I'd like to avoid copy/pasting the entire directory
    > (thousands of files) into the database if i can.
    >
    > The directory structure of the text files resembles...
    >
    > Music/A/Aerosmith/Song Name.txt - (extention varies)
    >
    > What i'd like to do is use php to scan the directory and input
    > everything into a table like...
    >
    > Dir Artist Song Text File
    > Type
    > ------------------------------------------------------------------------
    > A Aerosmith Song Name Fa La La La La (example text) File Ext
    > B Beatles Song Name Fa La La La La (example text) File Ext
    >
    >
    > I'm fairly new to php/mysql and have been banging my head against my
    > desk for too long on this one... if you can offer up any ideas -
    > please do.
    >
    > Thanks in advance for your help!
    >
    > Don Bedford.
    >
    >
    >
    > Maybe if I stop banging my head on my desk the answer'll come to me...
    > ------------------------------------------------------------------------


  • Next message: Frankenstein: "funcions using get/post/session/array"

    Relevant Pages

    • Re: OnoChord
      ... banging, do you really think that if a "performance artists" gets up ... on stage and bangs their head on the floor, ... Was passed off by his mother, ...
      (rec.music.beatles)
    • Re: PHP and ASP.NET go HEAD to HEAD
      ... What is "head to head" about his comparison? ... performance must be considered in comparing platforms -- and ASP.NET is no ... want to take half a step backwards and build one in PHP either, ... > ASP.NET officially requires that you use IIS. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: PHP and ASP.NET go HEAD to HEAD
      ... What is "head to head" about his comparison? ... performance must be considered in comparing platforms -- and ASP.NET is no ... want to take half a step backwards and build one in PHP either, ... > ASP.NET officially requires that you use IIS. ...
      (microsoft.public.dotnet.framework)
    • Re: PHP and ASP.NET go HEAD to HEAD
      ... What is "head to head" about his comparison? ... performance must be considered in comparing platforms -- and ASP.NET is no ... want to take half a step backwards and build one in PHP either, ... > ASP.NET officially requires that you use IIS. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: PHP and ASP.NET go HEAD to HEAD
      ... What is "head to head" about his comparison? ... performance must be considered in comparing platforms -- and ASP.NET is no ... want to take half a step backwards and build one in PHP either, ... > ASP.NET officially requires that you use IIS. ...
      (microsoft.public.dotnet.framework.performance)