close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Displaying results in a table

Thread began 12/07/2012 7:56 am by thehalpeen319342 | Last modified 12/12/2012 4:46 pm by Jason Byrnes | 956 views | 9 replies |


Displaying results in a table

Dear Jason,

I’m at the displaying results stage of my project.

My results are displayed in a table. The problem is if a user has say a long email address, this tends to push the table columns off to the right and into the margins, making the page look unprofessional – see attached ‘results.pdf. Can WebAssist help me present this data in a more professional looking table, that does not behave like this?

Attached Files
results page.pdf
Sign in to reply to this post

Willi Schneider


You could use "substr" to shorten the long names and email addresses:

<?php echo substr(($row_YourRecordset['your_db_column']),0,150); ?>

Where "0" would set the starting point and "150" gives you the string length

For example: If you want to shorten all the surnames to a maximum of 10 characters, your dynamic value would look like this:

<?php echo substr(($row_YourRecordset['your_db_column']),0,10); ?>

Hope that helps


Sign in to reply to this post


Dear Willi/Jason,

That's not exactly the solution I was hoping for. An email address chopped off after say 10 characters - that wouldn't look to professional. I'm looking for a solution from WebAssist that deals with this type of senario - what is best practice when presenting data in a table where the text in one column may push the columns on the right into the margins.

I was also hoping that there is an extension included in DataAssist that can configure the table to display alternate colours in each row.

Sign in to reply to this post

Jason ByrnesWebAssist

Your question is dealing with a results page. A results page is not necessarily intended to show the entire data in the record, that is the job of the details page.

I would take Willi's solution a step further and display ellipses if the mail address is to long:
<?php echo substr(($row_YourRecordset['your_db_column']),0,10); ?><?php if(strlen($row_YourRecordset['your_db_column']) > 10) echo "... "; ?>

Willi's solution may not be the answer you where hoping for, but in reality it is the best solution to the problem.

other options would be to add a width and overflow style to the table cell to add vertical scroll bars if the content where to wide for the cell, in my opinion, this looks worse than cutting it off.

The repeating table behavior will allow you to use different styles for evan and odd rows. See the "Using Repeating Tables in Data Bridge" tutorial on the Data Bridge support page:

Sign in to reply to this post


Dear Jason,

Okay, it sounds as if presenting the results in a table of rows is not a good ides.

I would then prefer to display the result of the members as business cards – like a catalogue – say 3 columns and what every number of rows it takes.

So in the results you have contact details, a photo and a description (currently limited to 500 characters in the database – but I wouldn’t want to see all 500 characters on the results page – maybe the first 100 characters.

So I’d like the width and height of each information to remain the same.

Can DataAssist Pages build a members catalogue similiar to a Product Catalogue? I've kind of improvised - see below.

What I’ve done so far:
I’ve tried to improvise with DataAssist Pages to build a business card results type page for the members, similar to a catalogue page - see attached screenshot. However, the result are too ‘liquid. I need a more rigid look so that all the members information has a consistent look and if the description is too long, it just stops at 100 characters (but not in the middle of a word) - I’ve seen catalogue websites in the past, where the text stopped – but it didn’t seem to stop in the middle of a word and there was an ellipse (...) at the end of the text, followed by a link you clicked on for ‘more’ details.

Attached Files
3 col Bus Card.pdf
Sign in to reply to this post

Jason ByrnesWebAssist

The data assist wizard wont crate a results page with your exact specifications, you would need to hand code the function to limit the number of words being displayed in the results.

this page has an example of how to accomplish that:

Sign in to reply to this post


Okay Jason, that's good on the word control and the character control.

But what happens if you say limit the words say to eight words, but it turns out that four of those words are very long - in this senario it seems seems to throw the height of the results all over the place.

My question still is what is the best WebAssist product to use to build a results page where you want to display details in the format of a catalogue and yet observes best practice as regards length of words for name, description, etc . I am familiar with hidden text and overflows, but that involves sizing div tags and I'm not sure is that best practice.

Is there any example/tutorials of what is best practice. With the WebAssist product catalogue in DataPages, it's too liquid on the height - I know this depends on the amount of text, but does the product not deal with this issue - or maybe e-cart deals with it.

Or to put my question another way, - what is the best way, using WebAssist, to build a product catalogue that has a consistent look (not so 'liquid' in terms of height). Is there a tutorial that shows how to deal with making a more rigid type catalogue?

I hope I'm making sense!

Sign in to reply to this post

Jason ByrnesWebAssist

  (not so 'liquid' in terms of height).  

Well, thats a contradiction. how would you propose dealing with content that is to long if not to wrap it to a new line, or hide it?

No WebAssist software is gong to fix this type of design issue for you, that is up to you as the site developer.

You ask what is the best practice, i have given a few examples. in reality the best practice is the one that works for you.

Sign in to reply to this post


Jason. I think you misunderstood me. I would hide the text with the overflow option, but what is best practice - is it good practice to set a height in a div tag for say a short description - with say a max of 10 words for this short description - what in this case is best practice - what happens if these words in one case, happen to be 10 long words and they don't fit in the height allocated and the words look as if they are cut or clipped - what is best practice here?

If I was to design a small product catalogue to integrate with e-cart, don't I need a more rigid setup for displaying my products?

Am I correct in saying that the default situation when you prepare a Product Catalogue results page is a liquid page, with no set height?

I look at any shopping cart and they don't seem to be so flexible.

Have you any good tutorial on a well designed shopping cart using Web Assist which gives some tips on setting layout?

Sign in to reply to this post

Jason ByrnesWebAssist

It entirely depends on what you want the display to look like.

you are the designer, these choices are up to you.

you are asking me to answer questions that don't have a definitive answer.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...