Limiting Length of DB Results Display (Full Version)

All Forums >> [Web Development] >> ASP, PHP, and Database



Message


darrenwilson -> 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?




BeTheBall -> 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.




darrenwilson -> RE: Limiting Length of DB Results Display (4/1/2004 11:14:27)

Thank you. That was EXACTLY was I needed. Quick and easy.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.109375