php mysqli语句中bind参数的错误

时间:2013-08-16 09:11:36

标签: php mysqli

$Statement= mysqli_prepare( $this->mysqli,'UPDATE empData SET Name=?, 
                            Email=?,
                            PhoneNumber = ?, 
                            AddressLine1 =?,          
                            AddressLine2 =?, 
                            CityID =?, 
                            Zip = ?, 
                            ModifiedOn = now()
                            WHERE id = ?');
mysqli_stmt_bind_param($Statement, 'sssssisi', trim($name), 
                        trim($email), 
                        trim(phnumber), 
                        trim(address1), 
                        trim(address2), 
                        $city=2, 
                        trim($zipcode), 
                        $id);
mysqli_stmt_execute($Statement);

查询在服务器严格标准上给出了一个错误:值通过引用传递给我使用trim和$city=2

在本地运行正常,但在服务器上它给我上面的错误?

是否有其他方法可以使用mysqli编写这些查询?

0 个答案:

没有答案