0

Hi, I have the follow select where it display like
that using oracle 11g:
M<->Note
1<->2
1<->3
1<->4
2<->8
2<->9

I want to display like that in a html table (M once):
M<->Note
1<->2
"<->3
"<->4
2<->8
"<->9

     $sql = ("SELECT DISTINCT(t1.MIN) AS M, T2.NOTA FROM T1 RIGHT JOIN T2 ON T1.MIN=T2.MIN WHERE (T1.MIN=$list) ");
     $stmt = oci_parse($conn, $sql);
     oci_execute ($stmt);
     while ($row = oci_fetch_assoc($stmt)) {
     $M = $row['M'];
     $NOTA = $row['NOTA'];

}
2
Contributors
2
Replies
18
Views
2 Years
Discussion Span
Last Post by jorgeftz
0

I don't really understand what do you mean by saying (ME once),
but if you want to display results in html table in this manner

    <?
    $output = "";
    $sql = ("SELECT DISTINCT(t1.MIN) AS M, T2.NOTA FROM T1 RIGHT JOIN T2 ON T1.MIN=T2.MIN WHERE (T1.MIN=$list) ");
    $stmt = oci_parse($conn, $sql);
    oci_execute ($stmt);
    while ($row = oci_fetch_assoc($stmt)) {
        $M = $row['M']; // 1
        $NOTA = $row['NOTA'];
        $output .="<tr><td>".$M."</td><td>".$NOTA."</td></tr>\n";
    }
    ?>
<table>
    <tr>
        <th>M</th><th>Note</th>
    </tr>
        <?php echo $output;?>
</table>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.