SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2003
    Location
    Temuco, Chile
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MAX LIMIT of registers

    Hi all.

    I have the next code (from php.net)
    PHP Code:
    $row 1;
    $fp fopen ("test.csv","r");
    while (
    $data fgetcsv ($fp1000",")) {
        
    $num count ($data);
        print 
    "<p> $num fields in line $row: <br>";
        
    $row++;
        for (
    $c=0$c<$num$c++) {
            print 
    $data[$c] . "<br>";
        }
    }
    fclose ($fp); 
    What is the MAX LIMIT of registers that I can read from my cvs file?
    20,000 50,000 100,000... ?

    thanks.

  2. #2
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Um, not sure, but if you are seriously playing with numbers even half that big, why don't you use a real RDBMS - or at least MySQL? Your text file is going to bark at you real quick...
    Aaron Brazell
    Technosailor



  3. #3
    SitePoint Member
    Join Date
    Jul 2003
    Location
    Temuco, Chile
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that's the idea; really i want to insert all this register into SQL Server Database. The example is just for to show the fgetcsv function.

    OK, the real problem is : i want to read registers from CSV file... but I want to filter register to register if is in the table or if isn't.

    PHP Code:
    while ($data fgetcsv ($fp1000",")) 
        {
        
    //pseudocode

         
    if the register IS in my table 
               to 
    DO a UPDATE
         
    if the register is NEW 
                
    to DO a INSERT 
        
    }

    Last edited by juque; Aug 7, 2003 at 13:32.


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
  •