OutFront Forums
     Home    Register     Search      Help      Login    

Sponsors
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

 

Limiting Length of DB Results Display

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> Limiting Length of DB Results Display
Page: [1]
 
 
darrenwilson

 

Posts: 82
Joined: 5/22/2002
From: Dallas, TX
Status: offline

 
Limiting Length of DB Results Display - 4/1/2004 10:58:17   
I would like to be able to limit the number of characters or words that display from the database. For example: if a column value contains a couple of paragraphs, I would just like to initially display the first five-ten words. Any ideas?

< Message edited by darrenwilson -- 4/1/2004 10:59:49 >
BeTheBall

 

Posts: 6502
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Limiting Length of DB Results Display - 4/1/2004 11:04:09   
Are we talking FrontPage? You can simply use the Left function. For example, if you are displaying results from a memo field as:

<%=fp_rsFieldVal("MyField")%>

Change it to:

<%=Left(fp_rsFieldVal("MyField"),7)%>

The 7 represents the number of characters you wish to display.

Hope it helps.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to darrenwilson)
darrenwilson

 

Posts: 82
Joined: 5/22/2002
From: Dallas, TX
Status: offline

 
RE: Limiting Length of DB Results Display - 4/1/2004 11:14:27   
Thank you. That was EXACTLY was I needed. Quick and easy.

(in reply to BeTheBall)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Limiting Length of DB Results Display
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts