ID:               22026
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         OCI8 related
 Operating System: Windows
 PHP Version:      4.3.0
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.


Indeed this is the duplicated report. Please follow up (as you have
also previousely done) on: http://bugs.php.net/14013

Secondly, this is an expected behavior, as Thies mentioned, Oracle
trims off the spaces. Not sure whether it is configurable somehow from
your side.

Maxim Maletsky


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

[2003-02-03 03:05:24] [EMAIL PROTECTED]

I guess I have a problem similar th ewone described in 14013.

When I use the OciBindByName, this function throw away the trailing
spaces which should be tranmitted via the bind variable. (When I'am
using the old Ora_Bind function it works like I expect).

For testing I minimized the problem to a "select from dual" to get it
as easy as possible.

I do four select-statement in each combination: the OCI- versus the old
Ora-functions and a bind-based versus a direct SQL-statement.

the php-code:

<?php
  $conn = OciLogon ("X","Y","Z");
  $val = " X X ";

  $stm1 = OciParse($conn, "select '".$val."' from dual");
  OciExecute($stm1);
  OciFetch($stm1);
  echo "<b>", OciResult($stm1, 1), "</b><br>\n";

  $stm2 = OciParse($conn, "select :input from dual");
  OciBindByName($stm2, ":input", &$val, 10);
  OciExecute($stm2);
  OciFetch($stm2);
  echo "<b>", OciResult($stm2, 1), "</b><br>\n";
  OciLogoff($conn);



  $Conn = Ora_Logon ("X@Z","Y");
  $val = " X X ";
  $Cursor = Ora_Open($Conn);
  Ora_Parse($Cursor, "select '".$val."' from dual");
  Ora_Exec($Cursor);
  Ora_Fetch($Cursor);
  echo "<b>", Ora_getColumn($Cursor, 0), "</b><br>\n";

  Ora_Parse($Cursor, "select :input from dual");
  Ora_Bind($Cursor, "val", ":input", 10);
  Ora_Exec($Cursor);
  Ora_Fetch($Cursor);
  echo "<b>", Ora_GetColumn($Cursor, 0), "</b><br>\n";

  Ora_Logoff($Conn);
?>


The output is:

<html>
<body>

<b> X X </b><br>
<b> X X</b><br>
<b> X X </b><br>
<b> X X </b><br>

</body></html>


And the second (5th) line (OCIBindByName) in the output is the one I
will not accept, because the tailing blank is away.

Best wishes,
Jens Reibiger



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


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

Reply via email to