note 51993 added to function.mssql-bind

From: Date: Mon, 18 Apr 2005 10:47:50 +0000
Subject: note 51993 added to function.mssql-bind
Groups: php.notes 
Request: Send a blank email to php-notes+get-88152@lists.php.net to get a copy of this message
The behavior appears to be different on windows (using dbnetlib) and linux (using freetds) On windows, one could miss out the optional parameters. On linux, the optional parameters aparently need to be supplied (or at least I got spurious errors) which stopped when I added them! I was using XAMPP (which gives me apache, php5, and freetds in one easy shot!) on FC3. Code example: $cn = mssql_connect($DBSERVER, $DBUSER, $DBPASS); mssql_select_db($DB,$cn); $sp=mssql_init("WDumpAdd"); // stored proc name mssql_bind($sp, "@productname", stripslashes($newproduct), SQLVARCHAR,FALSE,FALSE,150); mssql_bind($sp, "@quantity", stripslashes($newquantity), SQLVARCHAR,FALSE,FALSE,50); mssql_execute($sp) or die("could not perform insert"); mssql_close($cn); hope this helps Tim ---- Manual Page -- http://www.php.net/manual/en/function.mssql-bind.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51993 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51993&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51993&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51993&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51993&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51993&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51993&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#88152) next »