PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB » Bug #1005

affectedRows returns 0 for 'load data infile'

Details

Submitted2004-03-12 23:52 UTC
Fromrex at seas dot ucla dot edu
Assigneddanielc
StatusClosed
PackageDB
PHP Version4.3.3
OSSunOS 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.