473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

OCIFetchStatement from joined tables

Hi,

I'm having a problem getting the values from an OCIFetchStatement.

Using the following codes, I'm geting the results from two table
joined and I have to print out the results in such a way that I get
my first row from table A and then the results of the table B which
have the same key just below row of table A. and this goes on.
The values are replaced into a template before being displayed:

$nb_rt = OCIFetchStatement($stmt,$results);
for ( $i = 0; $i < $nb_rt; $i++ )
{
if ($i < $MAX_ROWS_DISPLAYED)
{
reset($results);
$index_rt++;
if (($i == 9) || ($i == $nb_rt-1))
$un_rt_modif_htm = $un_rt_last_htm;
else
$un_rt_modif_htm = $un_rt_htm;
$j = 0;
$id_rt = "";
$index = "";
while ( $column = each($results) ) {
$j++;
$data = $column['value'];
if ($j == 1)
$id_rt = $data[$i];
else if ($j == 2)
$index = $id_rt."_".str_replace(" ", "", $data[$i]);

$champ_rt[$j] = "#" . $column['key'] . "#";
$un_rt_modif_htm = replace_champs($champ_rt[$j], $data[$i],
$un_rt_modif_htm);
}
}

I'm trying to put the results of table B into a second array called
resultsB, since it is in the select statement as from the 12th column,
which defined as:

for($abc=0; $abc < 12; $abc++)
{
$resultsB[$abc] = $results[$abc+11];
}

The problem is that I'm not geting the values in the resultsB using
the following:

$j = 0;
$index = "";
while ( $column = each($resultsB) ) {
$j++;
$data = $column['value'];
if ($j == 1)
$index = $data[$x];
else if (($j > 1) && ($j <= 6))
$index .= "_".str_replace(" ", "", $data[$x]);
else if($j == 7) {
if($data[$x] == "Réémis") {
$index .= "_r";
}
else {
$index .= "_n";
}
}
}
I really don't know why it's not getting the values from resultsB.

Any suggestions please.

Thanks.
Jul 17 '05 #1
0 1206

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Pat Alessi | last post by:
Hi. I have a query that runs in about 2 Seconds in oracle and retrieves 4000 rows. However, when I time the ocifetchstatement in PHP, it is taking about 15 seconds to execute. The web server and...
1
by: Michael | last post by:
I have a query that uses two joined tables. The query contains data. I would like to pull in a data drom another table but when I add that table to the query design and make the join,the existing...
1
by: Carl B Davis | last post by:
Help please!!! I am an intermediate access user that is getting my bottom kicked by what seems an easy problem to fix. I maintain an employee database at work. I have set up a query from two tables...
8
by: Carl | last post by:
Hi, I hope someone can share some of their professional advice and help me out with my embarissing problem concerning an Access INSERT query. I have never attempted to create a table with...
1
by: Ersin Gençtürk | last post by:
hi , I have 2 tables , tUser and tUserRole and I have a query like : select * from tUser inner join tUserRole on tUserRole.UserId=tUser.UserId where tUser.UserId=1 this will return a user...
1
by: Ike | last post by:
I have a simple query of joined tables that is failing to give me any rows of data (though, in checking by hand, it certainly should). Essentially, I am trying to return all rows from `ups` that...
3
by: loosecannon_1 | last post by:
I get a 90-120 second blocking when send 15 or so simultaneous queries to SQL Server 2000 that query a view made up of two joined tables. After each query is blocking for the same amount of time...
5
by: zMisc | last post by:
Are there any tricks in updaitng a JOINed recordset? I joned to tables and when I try to change a field on the recordset and update it, I get this error: "Unknown column 'CCDE' in 'where...
0
bilibytes
by: bilibytes | last post by:
Hi there, I am wondering if there is a possibility to declare a Model_DbTable_Table1JoinedToTable2ToTable3... class It would be convenient to create compound table from several tables joined...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.