Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add is_write_type method for merge query #5183

Merged
merged 1 commit into from
Jul 14, 2017

Conversation

ytetsuro
Copy link
Contributor

I would like to get affected_rows when I run the following code:

<?php
$sql = <<<EOD
MERGE INTO DUAL A
USING DUAL B ON (A.ID = B.ID)
WHEN MATCHED THEN
    UPDATE SET A.FOO = B.BAR
WHEN NOT MATCHED THEN
    INSERT (ID, FOO) VALUES (B.ID, B.BAR)
EOD;

$this->db->query($sql);
var_dump($this->db->affected_rows());

@narfbg
Copy link
Contributor

narfbg commented Jul 12, 2017

Why are you overriding the method for OCI8 instead of just adding MERGE to the original one?

Signed-off-by: tetsuro yoshikawa <phper.0o0@gmail.com>
@ytetsuro
Copy link
Contributor Author

ytetsuro commented Jul 13, 2017

I thought MERGE was the only function of Oracel.
But that is wrong. It function MERGE also in SQL Server.
Thank you for your reply.

We rebased to change the modification part.

@narfbg narfbg added the Bug label Jul 14, 2017
@narfbg narfbg added this to the 3.1.6 milestone Jul 14, 2017
@narfbg narfbg merged commit f107a18 into bcit-ci:develop Jul 14, 2017
narfbg added a commit that referenced this pull request Jul 14, 2017
…e_type

add is_write_type method for merge query
narfbg added a commit that referenced this pull request Jul 14, 2017
@ytetsuro ytetsuro deleted the add_oci8_driver_write_type branch July 15, 2017 02:05
@ytetsuro
Copy link
Contributor Author

merged thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants