Hi friends, I am working on two tables. one table(A) stores id of another table(B).
I store id's in the table. with that corresponding 'id' ,i have to get the value given in table B. [php]<?php
$query = 'SELECT * FROM jos_domain where userid='. $_SESSION['userid'];
$db->setQuery($quer y);
$rows = $db->loadObjectList ();
foreach ($rows as $row)
{
$level= $row->lenglish_id;
$db->setQuery("SELE CT * FROM jos_elevel where id= $level");
$rows = $db->loadObjectList ();
foreach ($rows as $row) { echo $row->english;
echo ",";
}
?>
</td>
</tr>[/php]the ouput is displayed has 2,3,4
i want output to be displayed has only 2
and when i request for rows[1] i need to display its corresponding value.
then 3 has to displayed and then 4 has to be displayed.
can anybody tell how to get a single value i.e., only 2 has to be displayed .
when asked for it has to display value 3 . How ? plz. thanks in advance.
regards,
ramu
I store id's in the table. with that corresponding 'id' ,i have to get the value given in table B. [php]<?php
$query = 'SELECT * FROM jos_domain where userid='. $_SESSION['userid'];
$db->setQuery($quer y);
$rows = $db->loadObjectList ();
foreach ($rows as $row)
{
$level= $row->lenglish_id;
$db->setQuery("SELE CT * FROM jos_elevel where id= $level");
$rows = $db->loadObjectList ();
foreach ($rows as $row) { echo $row->english;
echo ",";
}
?>
</td>
</tr>[/php]the ouput is displayed has 2,3,4
i want output to be displayed has only 2
and when i request for rows[1] i need to display its corresponding value.
then 3 has to displayed and then 4 has to be displayed.
can anybody tell how to get a single value i.e., only 2 has to be displayed .
when asked for it has to display value 3 . How ? plz. thanks in advance.
regards,
ramu
Comment