Skip to Content.
Sympa Menu

freetds - Re: [freetds] Mapping of MS SQL data types to C/PHP data types

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Damien Churchill <damoxc AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Mapping of MS SQL data types to C/PHP data types
  • Date: Mon, 4 Jan 2010 16:32:31 +0000

2010/1/4 Trilok Khairnar <trilokgk AT gmail.com>:
> I should clarify that this is not a FreeTDS issue, but a question on
> programming a FreeTDS app using PHP/ C.
>
> I am wondering whether there is a performance penalty if the data type
> is not specifed when using mssql_result in mssql_result($result,$i) to
> get the ith column from a result set $result, or using odbc_result
> from PHP's ODBC module API.
>
> I also looked up the documentation of sqlsrv_get_field for MS SQL
> server driver for PHP.
> It says: "If no return type is specified, a default PHP type will be
> returned". However, at what level is the type inferencing done?
>
> Thanks,
> Trilok
>
>
>
> On Mon, Jan 4, 2010 at 8:35 PM, Trilok Khairnar <trilokgk AT gmail.com> wrote:
>> Is the mapping of MS SQL data types to C/PHP data types documented
>> somewhere?
>>
>> e.g. A similar mapping between SQL and CLR is documented here:
>> Mapping CLR Parameter Data
>> http://msdn.microsoft.com/en-us/library/ms131092.aspx
>>
>> Thanks,
>> Trilok
>>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>

http://cvs.php.net/viewvc.cgi/php-src/ext/mssql/php_mssql.c?revision=1.191&view=markup#l910
might possibly be of interest. Not sure how much help it will be
though!




Archive powered by MHonArc 2.6.24.

Top of Page