Domain changed to archive.palanq.win . Feb 14-25 still awaits import.
[5 / 1 / 1]

SQL guestions

No.1536807 View ViewReplyOriginalReport
I have two questions related to building a PHP / SQL website.

1. I wanna sort threads based on their reply count. The smartest way to count anything is to do it with an SQL query each time instead of having a fixed "replies" column in the database and +1 every time someone posts.
But how do I SQL SORT threads based on reply count if there is no "replies" column to sort by?

2. Prepared statements. My site has dozens of SQL selects and inserts. The "main loop" uses prepared statements but inside it are smaller SQL calls that don't (pic rel). How would you alter picrel.