Solved

Wrapping Output

Posted on 2006-06-11
3
279 Views
Last Modified: 2008-02-01
Hello,

I am working with a friend to make a small DB program.  I am the content writer, she is the programmer.  We've come up against a small program that we're hoping someone can help with.

The output of the data is in a kind of table, like a classified ads list.  The problem we are having is wraping the output.

If someone puts in a long unbroken string of text, it distorts the whole layout of the page.  Is there any special command of code we should be using on the cells or elsewher to force wrap the output from tables?

Put another way - when the mysql table is queried and displays its contents, is there any way to force that contents to always wrap to a certain width?

Thanks so much!

Ubee...
0
Comment
Question by:a466-ub52
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 30

Accepted Solution

by:
todd_farmer earned 250 total points
ID: 16882495
Not in an easy-to-use built-in MySQL function, no - this type of data manipulation is best done at the application layer.  You can limit the number of characters returned by doing something like SUBSTR(columnname, 200).
0
 
LVL 19

Assisted Solution

by:Kim Ryan
Kim Ryan earned 250 total points
ID: 16883007
Yes, you need to take the text output from the database and insert some non breaking spaces ( ) at the point of HTML creation. Alternatively you could filter the user input to prevent long strings from every being entered. This could easily be done with javascript.
0
 

Author Comment

by:a466-ub52
ID: 16883102
Thank you both very much!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating and Managing Databases with phpMyAdmin in cPanel.
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question