MYSQL - Select specific value from a fetched array

后端 未结 9 1398
青春惊慌失措
青春惊慌失措 2021-01-06 01:45

I have a small problem and since I am very new to all this stuff, I was not successful on googling it, because I dont know the exact definitions for what I am looking for.

9条回答
  •  有刺的猬
    2021-01-06 02:42

    $result = mysql_query("SELECT * FROM ... WHERE 1=1");
    while($row = mysql_fetch_array($result)){
    /*This will loop arround all the Table*/
        if($row['id'] == 2){
        /*You can filtere here*/
        }
    
        echo $row['id']. " - ". $row['name'];
        echo "
    "; }

提交回复
热议问题