Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Wrapping Output

Posted on 2006-06-11
3
Medium Priority
?
281 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 1000 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 1000 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

722 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