DOH! I guess I made a few presumptions:
1) The user would never pass a NULL sql:
$conn = OCILogon ("bla", "bla", "bla");
$sql = NULL;
$stmt = OCIParse ($conn, $sql);
OCIExecute ($stmt, OCI_DEFAULT);
$error = OCIError ($stmt); <-- seg fault here
print_r ($error);
?>
This condition would caus
This patch simply adds the original query text as the "sqltext" element and
the error offset as the "offset" element. It was made against the latest
CVS. Hopfully it'll suffice. If not, please let me know.
Daniel
Markus Fischer wrote:
Of course the offset is fine. But if I were you,
Of course the offset is fine. But if I were you, I wouldn't
put the asterisk into the sql statement; just provide the
offset. _This_ is the greatest flexibility you can provide
because all the information is passed unmodified to the
developer.
Serious environments need cus
I like the idea of having the sqltext in the return array, as well as
the offset. This is a very usefull tool for debugging oracle sql
queries. I believe its something that OCIError has been lacking.
Anyone that uses Oracle along with sqlplus, you get the * under the
broken portion of the query
Yes. An example of what would be in the array returned by OCIError would
be:
// Given the code below...
$conn = OCILogon (bla bla bla);
$sql = "select t.foo, t.bar from table t where t.id = 1";
$stmt = OCIParse ($conn, $sql);
OCIExecute ($stmt, OCI_DEFAULT);
$error = OCIError ($stmt);
//
On Tue, Mar 12, 2002 at 02:26:24PM -0800, Daniel Ceregatti wrote :
> How about doing what sqlplus does and simply add an asterisk at that
> point? I'm ok with rolling my own inside of the script by using the
> offset element. I simply think it'll do PHP users a service to have the
> "sqltext"
How about doing what sqlplus does and simply add an asterisk at that point?
I'm ok with rolling my own inside of the script by using the offset element.
I simply think it'll do PHP users a service to have the "sqltext" in the array
in _some_ form, even if only with an asterisk.
Your thoug
I'm -indefinite until the html gets out of it. There are no
error messages which do html on their own (if so, they are
bogus and need to be fixed). Command line does not use
.. anymore (has been fixed).
On Tue, Mar 12, 2002 at 02:02:30PM -0800, Daniel Ceregatti wrote :
> Hi,
>
>
Hi,
Andi, thanks for the feedback. I've changed the patch to include emalloc
and efree.
I actually use PHP from the command line a lot and I've noticed that
warnings always get wrapped in , so I figured it was ok to do HTML
here too.
I've modified the patch to also include an "offset" element i