ID:               35889
 Updated by:       [EMAIL PROTECTED]
 Reported By:      prohm at strato-rz dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         Sybase-ct (ctlib) related
 Operating System: Linux
 PHP Version:      4.4.1
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------

[2006-01-04 00:55:46] prohm at strato-rz dot de

Description:
------------
When I set the locale to [EMAIL PROTECTED] at the start of the script and read
a money-value from the database, he remove all after the point, because
after the setlocal he match at a comma, but the database reply ever an
point.

I I make the setlocal(LC_ALL,"[EMAIL PROTECTED]") after the sybase_query, it
work fine.

Reproduce code:
---------------
  setlocale(LC_NUMERIC,"[EMAIL PROTECTED]");
  print "<pre>\n";
  $conn = sybase_connect(XXX,XXX,XXX");
  $sql = " select kosten from artikel";
  $result=sybase_query($sql,$conn);
  while (list($kosten) = sybase_fetch_row($result)) {
    echo sprintf("%.2f",$kosten)."\n";
  }
  print "</pre>\n";


Expected result:
----------------
0,00
0,00
0,69
0,99
0,99
0,99
0,99
0,99
1,99
5,99
5,99



Actual result:
--------------
0,00
0,00
0,00
0,00
0,00
0,00
0,00
0,00
1,00
5,00
5,00



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35889&edit=1

Reply via email to