Solved

Wrapping Output

Posted on 2006-06-11
3
276 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
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now