Re: Re: Calling MSSQL Stored Procedure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mark Rees wrote:


I get 2005/09/16 10:09:22 AM which is exactly the same format as it
appears in the database table when viewed via Enterprise Manager.

I wouldn't set too much store by how it looks in EM. It is a datetime value,
so its internal representation will be quite different.

It seems likely that $actualdate isn't actually a datetime by the time it
gets to the database, for whatever reason.

Note this line from the adodb docs: (I am presuming you are using ADODB for
PHP here)

If $type parameter is set to false, in mssql, $type will be dynamicly
determined based on the type of the PHP variable passed (string => SQLCHAR,
boolean =>SQLINT1, integer =>SQLINT4 or float/double=>SQLFLT8).

http://phplens.com/lens/adodb/docs-adodb.htm

I would look into supplying the data type when adding the parameter
Please suggest what data type you would use. In the database the requisit field is a datetime but I cannot find in either adodb or php document a datetime type.
A little further down in the manual you refer to above it says interalia:-
[$*type*] Consult mssql_bind <http://php.net/mssql_bind> and ocibindbyname <http://php.net/ocibindbyname> docs at php.net for more info on legal values for type. and neither mssql_bind <http://php.net/mssql_bind> nor ocibindbyname <http://php.net/ocibindbyname> led me to a list of types but looking at GetType gave me the following list?????

   *

     "*boolean*
     <http://www.php.net/manual/en/language.types.boolean.php>" (since
     PHP 4)

   *

     "*integer* <http://www.php.net/manual/en/language.types.integer.php>"

   *

     "*double* <http://www.php.net/manual/en/language.types.float.php>"
     (for historical reasons "double" is returned in case of a *float*
     <http://www.php.net/manual/en/language.types.float.php>, and not
     simply "float")

   *

     "*string* <http://www.php.net/manual/en/language.types.string.php>"

   *

     "*array* <http://www.php.net/manual/en/language.types.array.php>"

   *

     "*object* <http://www.php.net/manual/en/language.types.object.php>"

   *

     "*resource*
     <http://www.php.net/manual/en/language.types.resource.php>" (since
     PHP 4)

   *

     "*NULL* <http://www.php.net/manual/en/language.types.null.php>"
     (since PHP 4)

   *

     "user function" (PHP 3 only, deprecated)

   *

     "unknown type"


Please tell me what I should use ?

--

Regards,
Alf Stockton		www.stockton.co.za

A classic is something that everyone wants to have read
and nobody wants to read.
		-- Mark Twain, "The Disappearance of Literature"

My email disclaimer is available at www.stockton.co.za/disclaimer.html

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux