importieren von daten aus csv file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • importieren von daten aus csv file

    wie kann ich daten aus einer csv-datei in eine mysql datenbank importieren?

    ich dachte vielleicht mit diesem script:

    PHP Code:
    $request1 .= "LOAD  DATA  LOW_PRIORITY INFILE  'http://www.xyz.de/administration/objekte.csv' REPLACE  INTO  TABLE objekte1 FIELDS  TERMINATED  BY  '|' ENCLOSED  BY  '' IGNORE 1 LINES;"
    PHP Code:
    $result1 mysql_db_query ($database$request1); 

    aber nichts funktioniert

    zu hause auf meinem server hat es funktioniert

    woran kann es liegen?

  • #2
    The LOAD DATA INFILE statement reads rows from a text file into a table at a very high speed.
    If the LOCAL keyword is specified, the file is read from the client host.
    If LOCAL is not specified, the file must be located on the server.
    Beantworte nie Threads mit mehr als 15 followups...
    Real programmers confuse Halloween and Christmas because OCT 31 = DEC 25

    Comment


    • #3
      kann man jeden beliebigen server als client angeben?

      (das php script liegt auf nem php server und soll automatisch mittels cronjob ausgeführt werden)

      Comment

      Working...
      X