|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-11-02 02:40 UTC] andy at mindgate dot net
odbc_result() returns a decimal instead of an integer value - but the column being returned is of type integer. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Jun 14 10:00:01 2026 UTC |
user update: I rewrote my bug report (#7583) but I can't seem to post it back again. I don't know what cvs user id to use and just entering my password doesn't work. Anyway here it is again: -----start bug report #7583----- Under MS SQL Server 7 ODBC Driver version (accdg to ODBC Data Sources in the Control Panel) 3.70.06.23 from Microsoft Corporation, Filename: SQLSRV32.DLL, after upgrading to PHP 4.0.3pl1 from 4.0.2, the following statements: $qryid=odbc_exec($link,"select @@IDENTITY as 'lastinserted'"); $lastinserted=odbc_result($qryid,"lastinserted"); seem to be putting a decimal value instead of an integer in $lastinserted because an error occurs which displays the value of $lastinserted in the odbc_exec string (that comes after the 2 statements above) as being in decimal instead of integer format (i.e. 14.00 instead of just 14). This also happens when retrieving values from columns like below: while (($fetchrowstat=odbc_fetch_row($qryid)) && $counter-->0) { $subnum=(odbc_result($qryid,"submission_num"); ... 'submission_num' is an MS SQL Server 7 integer column of width 4. ----- end bug report #7583 ---- Note: The value being returned by odbc_result() always gets printed out in the form xx.00. Does this mean it is decimal?