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

PDOStatement execute error #27

Closed
v-mabarw opened this issue Jul 29, 2014 · 4 comments
Closed

PDOStatement execute error #27

v-mabarw opened this issue Jul 29, 2014 · 4 comments

Comments

@v-mabarw
Copy link
Member

I am using PHP 5.4 (zend 5.6), IIS 7.5, and SQLSRV-PHP driver on my
development machine. I tried inserting some data into SQL2008R2 database using
the new driver but to my surprise every time i run execute(), it inserts the
same record twice. Below is my code:

$pdo = new PDO("sqlsrv:server=(local);database=devDb;");
$sql = "insert into tblTest (name,ts) values(:name, :ts)";
$stmt = $pdo->prepare($sql);
$args = array(':name'=>'Some Value',':ts'=>microtime(true));
if( $stmt->execute($args) ){

.....

}

When i run and check the db, it creates 2 records with a difference in the ts
field of some few micro seconds. On my production system which is running
PHP5.3, that is not an issue.
Could it be a problem in the driver or PHP itself

Work Item Details

Original CodePlex Issue: Issue 22416
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: May 17, 2012 at 2:33 PM
Reported by: quaspam
Updated on: May 21, 2012 at 3:01 PM
Updated by: jguerin

@v-mabarw
Copy link
Member Author

On 2012-05-17 23:59:09 UTC, jguerin commented:

Hi,

I have passed on your issue to customer support, and we'll see if we can replicate it on our side.

Thanks for reporting it.

Cheers,

Jonathan

@v-mabarw
Copy link
Member Author

On 2012-05-19 00:51:02 UTC, jguerin commented:

Hi quaspam,

Could you please create a thread on the forums so that the support team can follow up with you?

http://social.msdn.microsoft.com/Forums/en-US/sqldriverforphp/threads/

Thanks!

Jonathan

@v-mabarw
Copy link
Member Author

On 2012-05-21 22:01:32 UTC, jguerin commented:

Hi,

Customer support is unable to reproduce your issue. If you could go to the forums and post there, they would be able to gather more information from you.

Thanks,

Jonathan

@yitam
Copy link
Contributor

yitam commented Jan 6, 2017

It's been fixed. Closing this issue.

@yitam yitam closed this as completed Jan 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants