|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-02-15 11:06 UTC] devel at digitalaudiorock dot com
Description: ------------ For any columns of the types date, time, or timestamp, the db2_field_type function returns 'string'. It appears that this could be addressed by adding something like the following to the case statement in db2_field_type within ibm_db2.c: case SQL_TYPE_DATE: case SQL_DATE: str_val = "date"; break; case SQL_TYPE_TIME: case SQL_TIME: str_val = "time"; break; case SQL_TYPE_TIMESTAMP: case SQL_TIMESTAMP: str_val = "timestamp"; break; Though I'm not sure if the SQL_DATE, SQL_TIME, and SQL_DATETIME are needed, or if the others would require ODBCVER compiler directives. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 08:00:01 2025 UTC |
Two additional notes: This is actually in php 5.1.2, but there was no option for this in the dropdown list. Also, I should have posted the above code in diff form...here it is: *** ibm_db2.c_ORIG 2006-02-15 09:38:24.343776223 -0500 --- ibm_db2.c 2006-02-15 10:55:01.763884479 -0500 *************** *** 2925,2930 **** --- 2925,2942 ---- case SQL_BLOB: str_val = "blob"; break; + case SQL_TYPE_DATE: + case SQL_DATE: + str_val = "date"; + break; + case SQL_TYPE_TIME: + case SQL_TIME: + str_val = "time"; + break; + case SQL_TYPE_TIMESTAMP: + case SQL_TIMESTAMP: + str_val = "timestamp"; + break; default: str_val = "string"; break;