create table  ???
然后
insert??
不怎么理解你意思

解决方案 »

  1.   

    $rs = mysql_query("select zl_id, from a");
    while($r = mysql_fetch_row($rs))
      list($zl_id[],$[]) = $r;echo "<table><tr>";
    foreach($zl_id as $v)
      echo "<td>$v</td>";
    echo "</tr></tr>";
    foreach($ as $v)
      echo "<td>$v</td>";
    echo "</tr></table>";
      

  2.   

    如果你是想在页面上通过循环显示出这样的效果,用下面的方法:
    <table>
    <tr>
    <?php
    mysql_query();
    while(...){
        echo '<td><table><tr><td>'.$科目.'</td></tr><tr><td>'.$分数.'</td></tr></table>';
    }
    ?>
    </table>
      

  3.   

    <?php  $tmpt="select zl_id, from a;"
    $strsql=ociparse($conn,$tmpt);
    ociexecute($strsql,oci_default);
    while($r=ocifetch($strsql))
    {
    list($zl_id[],$ [])=$r;
    echo "<table><tr>";
    foreach($zl_id as $v)
    {
    echo "<td>$v</td>";
                echo "</tr><tr>";
    }
    foreach($ as $v)
    {
    echo "<td>$v</td>";
    echo "</tr></table>";
    }
    } //关闭数据库
    ocilogoff($conn);
    ?>还请高手看过来,我这样写为何总是不对呢??
      

  4.   

    很简单,因为你的<table>放在了循环体中了,所以每次循环都会重画一个表格了.
    正确的应该是:
    while($r=ocifetch($strsql))
       list($zl_id[],$ [])=$r;
    echo "<table><tr>";
    foreach($zl_id as $v)
       echo "<td>$v</td>";
    echo "</tr><tr>";
    foreach($ as $v)
       echo "<td>$v</td>";
    echo "</tr></table>";
      

  5.   

    <?php  $tmpt="select zl_id, from a;"
    $strsql=ociparse($conn,$tmpt);
    ociexecute($strsql,oci_default);
    while($r=ocifetch($strsql))
    {
    list($zl_id[],$ [])=$r;
    echo "<table><tr>";
    foreach($zl_id as $v)
    {
    echo "<td>$v</td>";
    }
                echo "</tr><tr>";
    foreach($ as $v)
    {
    echo "<td>$v</td>";
    }
    echo "</tr></table>";
    } //关闭数据库
    ocilogoff($conn);
    ?>
      

  6.   

    刚才写错了:
    <?php  $tmpt="select zl_id, from a;"
    $strsql=ociparse($conn,$tmpt);
    ociexecute($strsql,oci_default); while($r = ocifetch($strsql))
    list($zl_id[],$ [])=$r; echo "<table><tr>"; foreach($zl_id as $v)
    {
    echo "<td>$v</td>";
    }        echo "</tr><tr>"; foreach($ as $v)
    {
    echo "<td>$v</td>";
    } echo "</tr></table>"; //关闭数据库
    ocilogoff($conn);
    ?>