i want to echo out everything from a particular query. If echo $res I only get one of the strings. If I change the 2nd mysql_result argument I can get the 2nd, 2rd etc but what I want is all of them, echoed out one after the other. How can I turn a mysql result into something I can use?
I tried:
$query="SELECT * FROM MY_TABLE";
$results = mysql_query($query);
$res = mysql_result($results, 0);
while ($res->fetchInto($row)) {
echo "<form id="$row[0]" name="$row[0]" method=post action=""><td style="border-bottom:1px solid black">$row[0]</td><td style="border-bottom:1px solid black"><input type=hidden name="remove" value="$row[0]"><input type=submit value=Remove></td><tr></form>
";
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…