How do I produce a dynamic MySQL pivot table with PHP?

后端 未结 3 777
情书的邮戳
情书的邮戳 2021-01-03 15:34

What I have:

I have a table in MySQL named \"updates\" that currently holds the following information:

What I need:

What I need is the

3条回答
  •  [愿得一人]
    2021-01-03 16:10

    This a bit of code how to access to a database with MySQLI if this could help you

    connect_error) {
        echo "La connexion au serveur a etez interompu, Merci d'essayez plus tard";
    }else{
        $sql = 'SELECT nom FROM uiotable where nom= \'' . $nom_ut . '\'';
        //$numRows = $result0->num_rows;
        if (!$conn->query($sql)) {
            echo "Nom d'utilisteur incorrecte ";return;
        }else
            {   $result = $conn->query($sql);
    
            if ($result->num_rows > 0) {
            // output data of each row
                $row = $result->fetch_assoc();
                echo $row["mo_pas"];
            }       
        }
    ?>
    

提交回复
热议问题