resource id #4 Why am I getting this?

后端 未结 5 832
感动是毒
感动是毒 2020-12-11 20:51

I have a pretty basic forum template I am working on for testing purposes

When I create a topic, and press submit, the proccess updates the database but doesn\'t out

5条回答
  •  执念已碎
    2020-12-11 21:15

    You don't have to use mysql_fetch_array(). If you want, try something like this:

    $sql="SELECT * FROM $tbl_name ORDER BY id DESC"; //that's your query
    $result=mysql_query($sql);
    $rows=mysql_num_rows($result);
    $iteration=0;
    echo "";
    
    while($iteration < $rows){
        $cell_in_your_html_table = mysql_result($result , $iteration , 'column_name_from_database');
        echo "";
          $iteration++;
    }
    echo "
    ".$cell_in_your_html_table."
    "

提交回复
热议问题