If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Weird Problem while retrieving data via php

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-06-09, 03:53
ribu ribu is offline
Registered User
 
Join Date: Feb 2009
Posts: 2
Red face Weird Problem while retrieving data via php

Hi folks!

I've got DB2 V8.1 running, my webserver is a USS http server V5.3 within z/OS, PHP is version 5.1.2.

So, I want to retrieve data with a PDO object. Everything works fine, except floats. A value of an integer column, for example, is returned as a string, which is fine for me. The same goes for every other data type. Now for floats: they return as a string as well, but these strings only contain only weird signs like "<arrow-up><currency-sign><male><blank><arrow-down>". I don't really know where to start... codepage problems seem likely, except for the fact that everything else works just fine... integer 123 is returned as string "123" float 123 is a mess...

plz help. Thanks!
Reply With Quote
  #2 (permalink)  
Old 02-06-09, 06:33
ribu ribu is offline
Registered User
 
Join Date: Feb 2009
Posts: 2
OK, so I figured out a workaround: if I alter the SQL-statement from "SELECT abc FROM xyz..." to "SELECT CHAR(abc) FROM XYZ..." the values of 'abc' are returned correctly as a string. However, the initial problem itself is still there and it really drives me crazy...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On