|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-11-13 21:01 UTC] vrana@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Jun 16 09:00:02 2026 UTC |
Description: ------------ function.odbc-field-name does not respect the AS function in a SELECT statement shown below: $query_db_CDR = "SELECT tbl_EM_Matrix.hostname as vru from ..." The result, returns 'hostname', instead of 'vru'. Reproduce code: --------------- --- From manual page: function.odbc-field-name --- function odbc_fetch_assoc($result){ if (odbc_fetch_row($result)) { $return_array=array(); $max_result=odbc_num_fields($result); for ($counter=1;$counter<=$max_result;$counter++){ $return_array[odbc_field_name($result, $counter)] = odbc_result($result, $counter); } return $return_array; } } Expected result: ---------------- Using the select statement from above, I should be able to print_r (odbc_fetch_assoc($result)), and see 'vru'. Instead, I see 'hostname'. The function does not respect the "as" function. Array ([hostname]=>) Actual result: -------------- Array ([vru]=>)