gpt4 book ai didi

java - 选项标记中的 mysql 列值

转载 作者:太空宇宙 更新时间:2023-11-03 10:43:25 25 4
gpt4 key购买 nike

$sql1 = "SELECT c.comm FROM enquiry e JOIN comments c ON e.id = c.enquiryId where e.id = '$memberId' AND e.cmpId = '$companyId'";    
$result1 = mysqli_query($conn, $sql1);
echo "<select class='form-control' name='comment'>";
while($row1 = mysqli_fetch_array($result1, MYSQLI_ASSOC)){
echo "
<option value='".$row1['comm']."'>".$row1['comm']."</option>

</select>";
}

我想在选项中回显 c.comm 的所有值,但在获取 ptint 时只有一个值请帮忙 As  u can see all the values of column are getting print but only one value is inside the option tag, i want all values in the option tag

最佳答案

把你的关闭</select> while 之后的标签循环。

关于java - 选项标记中的 mysql 列值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34883632/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com