note 49556 added to function.mssql-query

From: Date: Tue, 01 Feb 2005 14:11:06 +0000
Subject: note 49556 added to function.mssql-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-84325@lists.php.net to get a copy of this message
Although mssql_query does not support datetime paramaters with stored procedures, there is a simple way of getting around it. Bind the parameter as a string i.e. SQLVARCHAR or SQLCHAR mssql_bind($stmt, "@JoinDate", value, SQLVARCHAR, false,null,19); and then use the sql server function CONVERT() in your stored procedure to convert the parameter to a datetime variable before using it. SELECT @JD = convert(datetime,@JoinDate,103) ---- Manual Page -- http://www.php.net/manual/en/function.mssql-query.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49556 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49556&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49556&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49556&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49556&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49556&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49556&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84325) next »