Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.12.2

Bug #1005 affectedRows returns 0 for 'load data infile'
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)    
Subscription  


 [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.

Comments

 [2004-03-13 16:11 UTC] danielc
Good point. LOAD DATA statements now return TRUE from isManip() so should produce a row count from affectedRows(). Thanks.