"id" "name" "age" "address" "pincode"
"1" "Peter" "25" "1 Elm Street" "91550"
"2" "James" "30" "2 Elm Street" "91551"
"3" "John" "32" "3 Elm Street" "91552"
"4" "Andrew" "33" "4 Elm Street" "91553"
是否可以在此处选择所有行的计数,但仅显示 age <=30 的行?
我只需要显示年龄 <=30 的用户并提供查看其他用户的链接。仅当其他用户大于 30 时才会显示该链接。
我目前使用 2 个选择和 php 来执行此操作。我正在寻找一种更好的方法来做到这一点,而不是使用 2 个选择。
期望的输出
"id" "name" "age" "address" "pincode"
"1" "Peter" "25" "1 Elm Street" "91550"
"2" "James" "30" "2 Elm Street" "91551"
LINK GOES HERE -> View 2 other users //This is the diff from rows outputted and total rows