php - 想要将列值与同一个 mysql 表中的其他列值匹配

标签 php mysql

this is by table stucture..

this is my meny tree

菜单树的图像实际上是静态名称,但现在我想从我的数据库表中获取该名称。我知道如何从表中选择记录,例如 .. select * from table_name whereparent=0 ...以及选择子项 select * from table_name whereparent>0.. .我能理解如何实现它 但问题是现在我想运行

最佳答案

 select * from table_name where parent>=0

关于php - 想要将列值与同一个 mysql 表中的其他列值匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21952419/

相关文章:

php - 警告 : mysql_num_rows(): supplied argument is not a valid MySQL result resource with no mysql_error()

php - 将图像上传到数据库

mysql - 我如何将 .csv 数据转换为 mysql?

c# - 使用 LINQ 进行 JOIN 和 Sum

mysql - 按组内顺序排列

php - 如何获取非常具体的 XML 元素的值...?

php - Codeigniter - 如何将数据库结果垂直显示为列而不是行

php - 从 php 执行的 Shell 脚本,但 sh 脚本中的命令不会运行

php - 更改数据库中已保存的信息以使用另一个 php 更新

mysql - 用户/好友表中 DynamoDB 的最佳建模技巧