Home » Database » DB » Bug #1005
affectedRows returns 0 for 'load data infile'
Details
| Submitted | 2004-03-12 23:52 UTC |
|---|---|
| From | rex at seas dot ucla dot edu |
| Assigned | danielc |
| Status | Closed |
| Package | DB |
| PHP Version | 4.3.3 |
| OS | SunOS server7 5.8 Generic_1085 |
| Roadmaps | (Not assigned) |
Comments
[2004-03-12 23:52 UTC] rex at seas dot ucla dot edu
Description:
------------
When using the mysql command of "LOAD DATA INFILE" and then checking how many rows were affected, I get a result of always zero.
Reproduce code:
---------------
$db = DB::connect($dsn);
$sql = "load data infile 'test.txt' replace into table test (key,data)";
$result = $db->query($sql);
$num_changes = $db->affectedRows();
Expected result:
----------------
The number of rows that are affected by the loading of data from the file.