NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page mysql question

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 06-27-2003, 06:00 AM THREAD STARTER               #1 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer

mysql question


yo people

im building a web based register and im stuck basically

ive got my sql code
PHP Code:
SELECT FROM `$groupORDER BY `idDESC 
????: NamePros.com http://www.namepros.com/programming/14909-mysql-question.html
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
adam_uk is offline  
Old 06-27-2003, 07:44 PM   #2 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



Hmm maybe you could just put it into separate variables? I'm sure there's other ways, but I don't know any of them.
????: NamePros.com http://www.namepros.com/showthread.php?t=14909


PHP Code:
$all_entries "SELECT * FROM `$group` ORDER BY `id` DESC";
$todays_entries "SELECT * FROM `$group` ORDER BY `id` DESC LIMIT 2"
Maybe ?
deadserious is offline  
Old 06-28-2003, 08:00 AM THREAD STARTER               #3 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer
yeh i was thinking somthing like that cheers
adam_uk is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 09:07 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger