#50978 [Opn->Fbk]: OciFetchStatement

2010-02-10 Thread sixd
 ID:   50978
 Updated by:   s...@php.net
 Reported By:  atila at nutroeste dot com dot br
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: RHEL 5.2 64 BITS
 PHP Version:  5.2.12
 Assigned To:  sixd
 New Comment:

Some thoughts:
- really verify the statement should succeed and there is data in the 
table
- echo the statement out and make sure there are no syntax errors
- add error checking to your OCI calls
- make sure the table is not being modified (e.g columns added or data

removed) by another job
- after getting the error, verify your script runs with command line 
PHP (instead of using a DB tool)






Previous Comments:


[2010-02-10 12:53:33] atila at nutroeste dot com dot br



  Sorry if I wasn't clear enough,and if you want I could give you
accesses do my server by Terminal Server, to see the real sql.
please be comfortable to contact me by e-mail, and anything to help you
to resolve this please!!! ask me. Because my transactional system has
been passed by a lot o changes and I had to create a lot of union's
between what I had and the customizations I have now.

Thanks a Lot for your attention

Atila Santos



[2010-02-09 21:49:58] johan...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2010-02-09 20:13:21] atila at nutroeste dot com dot br

Description:

Dears,

The function is  OciFetchStatement.

Since I have more than 2 times the same problem, and the task to
resolve this was to hard. I have to report that every time I use a
complex sql using operator union or union all, the return message is

Notice: Undefined offset: 0 in
/usr/local/apache/html/pedidos/teste_union.php on line 19
numero de linhas:

As you can see the "Undefined offset: 0" means that there is no
record to be retrived from a query, but if I run this same query using
my database tool, a result could be seen.

To resolve this I had to create temporary tables to insert the
data into it's own structure using my sql union/union all query to
became only one table and force the OciFetchStatement to retrive the
results I wanted.   
My database is Oracle 10.2.04 running on Linux rhel 5.2 64bits.
My php version is source 5.2.9 running in the same host.

Thanks an advance

Atila Santos
mail: at...@nutroeste.com.br
Country Brazil
State Goias, city: Goiania
+5562-30962539/2500
System Analist/Dba Oracle/Web Developer 

Reproduce code:
---
Notice: Undefined offset: 0 in
/usr/local/apache/html/pedidos/teste_union.php on line 19

Expected result:

The result should bring me up values of rows.






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



#50978 [Opn->Fbk]: OciFetchStatement

2010-02-09 Thread johannes
 ID:   50978
 Updated by:   johan...@php.net
 Reported By:  atila at nutroeste dot com dot br
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: RHEL 5.2 64 BITS
 PHP Version:  5.2.12
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




Previous Comments:


[2010-02-09 20:13:21] atila at nutroeste dot com dot br

Description:

Dears,

The function is  OciFetchStatement.

Since I have more than 2 times the same problem, and the task to
resolve this was to hard. I have to report that every time I use a
complex sql using operator union or union all, the return message is

Notice: Undefined offset: 0 in
/usr/local/apache/html/pedidos/teste_union.php on line 19
numero de linhas:

As you can see the "Undefined offset: 0" means that there is no
record to be retrived from a query, but if I run this same query using
my database tool, a result could be seen.

To resolve this I had to create temporary tables to insert the
data into it's own structure using my sql union/union all query to
became only one table and force the OciFetchStatement to retrive the
results I wanted.   
My database is Oracle 10.2.04 running on Linux rhel 5.2 64bits.
My php version is source 5.2.9 running in the same host.

Thanks an advance

Atila Santos
mail: at...@nutroeste.com.br
Country Brazil
State Goias, city: Goiania
+5562-30962539/2500
System Analist/Dba Oracle/Web Developer 

Reproduce code:
---
Notice: Undefined offset: 0 in
/usr/local/apache/html/pedidos/teste_union.php on line 19

Expected result:

The result should bring me up values of rows.






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