PHP 如何创建所有任务的列表
好吧,我有一个任务表,该表有一个外键,即“projectID”,
我正在选择该表中具有相同 projectID 的所有行。但我现在想将结果输出到列表中 ("")
//Select tasks
$sql = "SELECT * FROM tasks WHERE projectID = '".$project_ID."'";
$result5 = $db->sql_query($sql);
$data5 = mysql_fetch_assoc($result5);
Alright, I have a table of tasks this table has a foreign key which is the "projectID"
I am selecting all the rows within that table that have the same projectID. But I now want to output the results in a list ("<li></li>
")
//Select tasks
$sql = "SELECT * FROM tasks WHERE projectID = '".$project_ID."'";
$result5 = $db->sql_query($sql);
$data5 = mysql_fetch_assoc($result5);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将需要迭代每一行并输出 taskList 列值:
You're going to need to iterate through each of the rows and output the taskList column value: