Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
If you can't
login and post questions or you are having trouble viewing forum posts:
Click Here
|
Callback
Support |
If you live in USA, UK, Canada, Australia or New
Zealand, you can leave us details on your question and request us to call you back and discuss
them with you personally (charges apply). |
Click Here
|
Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
|
Correct rows - blank fields using PHP |
Author |
Message |
Dan |
|
Group | : Members |
Posts | : 2 |
Joined | : 2007-04-04 |
|
Profile |
|
Posted : 2007-04-04 18:15:21 |
Hi,
I am currently experiencing some issues with the web server edition of the QODBC driver.
The query runs fine through the VB, as you can see here:
However, when I run the following basic query via PHP:
<? $sql = "SELECT TimeCreated, TimeModified, FirstName, LastName FROM Employee"; $conn = odbc_connect('QODBC','',''); $rs = odbc_exec($conn,$sql);
while ($row = odbc_fetch_array($rs)) { echo "<pre>"; print_r($row); echo "</pre>"; }
?>
It finds the correct number of rows, it finds the correct fields - however all the contents of the fields return blank. The above script returns the following array dump:
Array ( [TimeCreated] => [TimeModified] => [FirstName] => [LastName] => )
Array ( [TimeCreated] => [TimeModified] => [FirstName] => [LastName] => )
Array ( [TimeCreated] => [TimeModified] => [FirstName] => [LastName] => )
Array ( [TimeCreated] => [TimeModified] => [FirstName] => [LastName] => )
Array ( [TimeCreated] => [TimeModified] => [FirstName] => [LastName] => )
If anyone can shed any light on the matter it would be appreciated, I have tried a couple of different versions of the script above to see if it was the PHP, but I cant find anything... So I think it might be something I am missing in the configuration?
Cheers,
Dan |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-04-04 23:42:42 |
|
|
|
Dan |
|
Group | : Members |
Posts | : 2 |
Joined | : 2007-04-04 |
|
Profile |
|
Posted : 2007-04-05 18:29:16 |
I have, that didn't work either.
We got it working using an ADO connection instead. |
|
|
|
|
Posted : 2007-06-02 05:32:19 |
DisplaySQL.php worked for me on that SELECT statement... i just replaced the default (installed) $sSQL statement with the requested SELECT statement and it ran fine. |
|
|
|
|