Replies: 1 comment
-
In PHP doc is written, that an attribute $conn = new Dibi\Connection([
'driver' => 'pdo',
'dsn' => '...',
'options' => [
PDO::MYSQL_ATTR_LOCAL_INFILE => '...',
],
]); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been using Dibi for a while and am loving how simple yet powerful everything is. Recently a use case has come up for my application to bulk load 10,000s of rows via CSV into my MySQL DB.
I've used 'LOAD DATA LOCAL INFILE' for this in the past, but after reviewing the documentation and looking through open/closed issues on the project, it doesn't appear there is a clear way to set PDO attributes when creating a new connection.
The specific attribute I'm trying to enable is 'PDO::MYSQL_ATTR_LOCAL_INFILE'.
I can always revert back to just using a core PDO connection and do the query that way, but I was just curious if Dibi already has some method of doing this, so that we're not having to maintain two methods of running these sorts of queries (via Dibi and now via PDO statements).
Thanks again for this amazing framework guys.
Beta Was this translation helpful? Give feedback.
All reactions