|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45445 odbc_field_len(), odbc_field_precision(), odbc_field_scale() - don't work
Submitted: 2008-07-07 10:05 UTC Modified: 2020-10-18 04:22 UTC
Avg. Score:3.2 ± 1.2
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: BunakovM at meta dot ua Assigned: cmb (profile)
Status: No Feedback Package: ODBC related
PHP Version: 5.2.6 OS: Windows XP, SP2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-07-07 10:05 UTC] BunakovM at meta dot ua
The functions odbc_field_len(), odbc_field_precision(), odbc_field_scale() - don't work corractly when use Transbace ODBC driver in "SELECT ..." SQL-statement.

Reproduce code:
$con_str = "Driver={Transbase ODBC};Database=MyDB";
$db_conn = odbc_connect($con_str,"user","0")

$query = "SELECT * FROM Tab1";
$res = odbc_exec($db_conn, $query);
$num_fields = odbc_num_fields($res);
for($j=1; $j<=$num_fields; $j++){
  echo odbc_field_name($res,$j);
  echo '<br/>' . odbc_field_type($res,$j);
  echo '<br/>' . odbc_field_len($res,$j);
  echo '<br/>' . odbc_field_precision($res,$j);
  echo '<br/>' . odbc_field_scale($res,$j);
  echo '<br/>' . odbc_result($res,$j);

odbc_free_result($res);    // Free Result
odbc_close($db_conn);    // Close Connection

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-12 15:12 UTC] pits_1 at mail dot ru
Mikhail (Maksim?)!

I can not found ODBC-driver for TransBase 8-(((
Help me? PLS!

Are PHP interface realy exist?

Peter S. from Russia, SPb
 [2016-06-13 13:04 UTC]
-Status: Open +Status: Feedback
 [2016-06-13 13:04 UTC]
Does this issue still persist? The ODBC extension had been
reworked for PHP 7.0.0, so please check with a recent PHP version.
 [2016-06-13 18:26 UTC] BunakovM at meta dot ua
I cannot test it now
 [2016-06-15 00:19 UTC]
-Status: Feedback +Status: Open
 [2020-10-05 08:00 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-10-05 08:00 UTC]
If you still can reproduce this with any of the actively supported
PHP versions[1], please update the PHP version info, and an ODBC
trace of running the provided test script.

[1] <>
 [2020-10-18 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 07:01:34 2024 UTC