General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 11th, 2002, 08:29 PM
littleblackdog littleblackdog is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Anchorage
Posts: 118 littleblackdog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
How to limit output

Here is a question from a member in another forum:

I'm using PHP and MSSQL and would be very grateful if anyone can tell me how to limit the records displayed to say 25 in each page. Previously I had used PHP and MySQL and used the LIMIT function. I just can't find out how to do this in MSSQL. Any help would be very appreciated.

I also would like this answer, but for PHP and MySQL. I am trying to print cards, three to a page, from data in database. Currently the "cards" are being placed but some are cut in half. I just want three or four per page...

How to do this? I've seen examples of this before...
Help
__________________
bow wow!

Reply With Quote
  #2  
Old December 11th, 2002, 09:50 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
SELECT TOP 25 * FROM tablename

I think thats it

Reply With Quote
  #3  
Old December 12th, 2002, 02:20 PM
littleblackdog littleblackdog is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Anchorage
Posts: 118 littleblackdog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
I'm now making it more difficult

By using the SELECT statement, I can limit the number of rows displayed, but with my particular need, I want to display all the data ( rows ) in a format that is easy to print... but they just aren't lining up. The output has the data going into a table. Three and 1/2 tables fit per page. If I select three per page, the person would have to go to each page then print to get all the "cards" printed. Since 3.5 fit per standard 8.5 x 11 page, I get a "card" cut in half, ugly and missing every fourth card.

I've been adjusting the size of the tables (cards) so that they fit when printed but it is difficult, every printer prints different.

Any ideas?

Are there printing options, like to print just three "cards" per page from the output page containing all the rows from database or query...

Hope I'm explaining this well.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > How to limit output


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT