note 59671 added to ref.mssql

From: Date: Tue, 13 Dec 2005 05:55:59 +0000
Subject: note 59671 added to ref.mssql
Groups: php.notes 
Request: Send a blank email to php-notes+get-100042@lists.php.net to get a copy of this message
hey guys, I m stucked up in a stuff and can't proceed further coz of this. Please help me out. I m entering the date in a form in the "DD-MM-YYYY" format, which i then converted into a string using dot(.) operator in php. I have to insert that converted string in "datetime" format in the MSSQl database. I tried in many ways. One of them is: $date = "$month"."/"."$day"."/"."$year"; $query1 = " DECLARE @newdate datetime; SELECT @newdate = convert(varchar(100), '$date',102); INSERT INTO transaction_table values (\"$amount\",\"$goods_type\", @newdate)"; $result1 = mssql_query($query1); Guys please help me out. Thank u very much. U can personally mail me @ the_jayanta@yahoo.com ---- Manual Page -- http://www.php.net/manual/en/ref.mssql.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+59671 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59671&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59671&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59671&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59671&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59671&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59671&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59671&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+59671&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#100042) next »