SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: MAX LIMIT of registers
-
Aug 7, 2003, 12:23 #1
- 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 ($fp, 1000, ",")) {
$num = count ($data);
print "<p> $num fields in line $row: <br>";
$row++;
for ($c=0; $c<$num; $c++) {
print $data[$c] . "<br>";
}
}
fclose ($fp);
20,000 50,000 100,000... ?
thanks.
-
Aug 7, 2003, 12:26 #2
- 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...
-
Aug 7, 2003, 14:12 #3
- 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 ($fp, 1000, ","))
{
//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 14:32.
Bookmarks