PDO ODBC with SybaseASE - text datatype
Open
Nobody has claimed this yet.
Bug
Extension: pdo_odbc
Status: Needs Triage
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
The following code:
<?php
$pdo = new PDO('odbc:Driver={SybaseDriver};Server=xxx;Port=yyy;', user', 'pwd');
$result = $pdo->query('exec some_procedure')->fetchAll();
echo '<pre>';
var_dump($result);
echo '</pre>';
Resulted in this output:
["test"]=>
NULL
[0]=>
NULL
But I expected this output instead:
["test"]=>
string(4) "test"
[0]=>
string(4) "test"
DB columns with data type text are always NULL https://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc32300.1570/html/sqlug/X20354.htm
PHP Version
PHP 8.1.29
Operating System
Rocky Linux 9.4 (Blue Onyx)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the PDO ODBC query and fetchAll behavior against Sybase ASE using a procedure that returns a text column. Compare the fetched values with the reported NULL output and expected strings; done means text columns are returned correctly in both associative and numeric result entries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100