- Impact
- 20
yo people
im building a web based register and im stuck basically
ive got my sql code
and that will display all the entrys in that table the lnk would be entrys.php?group=2017
but i want to keep the same file but to display the entrys from that day (there are 2 entrys per day)
so i would add a limit onto the end of the code but instead of a value i would give it a variable
then the link would be entrys.php?group=2017&limit=2
now i know all this but when it comes to display all the entrys i dont want to define a limit
so basucally my question is how would i get it so that i can define a limit on todays entrys but not on all the entrys?
im think abotu an IF statement but im not sure wether it would be logical or not
im building a web based register and im stuck basically
ive got my sql code
PHP:
SELECT * FROM `$group` ORDER BY `id` DESC
and that will display all the entrys in that table the lnk would be entrys.php?group=2017
but i want to keep the same file but to display the entrys from that day (there are 2 entrys per day)
so i would add a limit onto the end of the code but instead of a value i would give it a variable
then the link would be entrys.php?group=2017&limit=2
now i know all this but when it comes to display all the entrys i dont want to define a limit
so basucally my question is how would i get it so that i can define a limit on todays entrys but not on all the entrys?
im think abotu an IF statement but im not sure wether it would be logical or not