CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Limit Length of Result

Print topic Send  topic

Author Message
Damian Hupfeld
Posted: 04/04/2007, 5:37 AM


Not really a CCS question - but...

I have a list box being populated from a database. Some of the entries are
200characters. My page format only accommodates about 100 characters so the
page is all screwed up. Any suggestions on how to limit the length of the
text displayed in the list box? I want to retrieve the record but only
display the first 100characters....

I have used SUBSTR to limit text in labels but I dont think I can do this
for the listbox - possibly this needs to be done in the SQL?

Damian

Wkempees
Posted: 04/04/2007, 7:59 AM

In style sheet (or inline)
  
..width30            { width:30px }  
..width50            { width:50px }  
..width75            { width:75px }  
..width100           { width:100px }  
..width200           { width:200px }  
..width250           { width:250px }  
..width300           { width:300px }  

Then you can add class="width300" and the listbox should display only
the length from the class.

In SQL
SELECT LEFT(field, length)

Walter
Wkempees
Posted: 04/04/2007, 10:23 AM

> http://forums.codecharge.com/posts.php?post_id=68162
Damian Hupfeld
Posted: 04/04/2007, 1:46 PM

Thanks Walter.

"Wkempees" <kempe819@planet.nl> wrote in message
news:ev0mv2$n4i$1@news.codecharge.com...
>> http://forums.codecharge.com/posts.php?post_id=68162


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.