|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-01-24 14:53 UTC] tony2001@php.net
[2006-01-25 13:04 UTC] lvm99 at mail dot ru
[2006-01-25 13:18 UTC] tony2001@php.net
[2006-01-25 13:26 UTC] lvm99 at mail dot ru
[2006-01-25 13:34 UTC] tony2001@php.net
[2006-04-09 07:49 UTC] wez@php.net
[2006-04-17 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 22:00:01 2025 UTC |
Description: ------------ ODBC connection to MSSQL $sql = "UPDATE sources_test SET title=:title, name=:name WHERE id=:id"; $sth = $db->prepare($sql); $params = array(':title'=>'updated with params', ':name'=>'new name', ':id'=>'9586850') $isOk = $sth->execute($params); all param's fields (title, name) filling with ':id' value i.e. '9586850' If I bind just 'id' as param UPDATE works right or If I bind 'title' and 'name' but not id UPDATE works right or If I connect throut MSSQL interface everything is OK Reproduce code: --------------- //MSSQL Server 2000 $dsn ='server'; $database = 'testbase'; $login ='us'; $password = 'us'; //... $db = new PDO("odbc:Driver={SQL Server}; Server=".$dsn."; Database=".$database, $login, $password, array(PDO::ERRMODE_EXCEPTION => true)); //... $sql = "UPDATE sources_test SET title=:title, name=:name WHERE id=:id"; $sth = $db->prepare($sql); $params = array(':title'=>'updated with params', ':name'=>'new name', ':id'=>'9586850') $isOk = $sth->execute($params); Expected result: ---------------- Fields have to be set to name = 'new name' title='updated with params' Actual result: -------------- name = '9586850' title= '9586850'