|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1276 OCIBindByName with DATE variable -> error
Submitted: 1999-03-28 17:40 UTC Modified: 2006-07-17 08:43 UTC
From: steffenmail at writeme dot com Assigned: thies (profile)
Status: Closed Package: OCI8 related
PHP Version: 3.0.7 OS: SuSE linux 6.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: steffenmail at writeme dot com
New email:
PHP Version: OS:


 [1999-03-28 17:40 UTC] steffenmail at writeme dot com
OK, the problem seems to appear when I try to insert an empty value into a table. When I do

OCIBindByName($stmt,":vorname",&$vorname, 20);

and $vorname is "" then PHP says:

Warning: OCIStmtExecute: ORA-01480: trailing null missing from STR bind value in /www/ on line 80

How can I insert empty values? Or do I have to check on every value if it's empty?

Thanks in advance,
- Steffen


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-04-06 07:59 UTC] thies
works for me -> try this code....
you should be able to insert empty columns using bound variables like shown below:

$conn = OCILogon("scott","tiger");

$stmt = OCIParse($conn,"insert into emp (empno, ename) ".
                       "values (:empno,:ename) ");

$data = array(1111 => "", 2222 => "Bill", 3333 => "Jim");

// "1111" has no user-name....


while (list($empno,$ename) = each($data)) {


PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 21 14:01:27 2024 UTC