Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 09-06-2002, 06:54 AM   #1 (permalink)
toe_cutter
Code Monkey
 
Join Date: Aug 2002
Location: Boston, MA
Posts: 79
toe_cutter is on a distinguished road
Send a message via ICQ to toe_cutter Send a message via AIM to toe_cutter Send a message via Yahoo to toe_cutter
Word Wrap with Mysql type Text???

I am trying to echo to the screen a field from MySql which is of type Text.

The problem I am having is that it is not word wrapping. I have tables set up to width="100%", but it is just making the test one line and you have to scroll to see it.

Code:
echo ("
<table width=\"100%\" border=\"1\">
  <TR>
    <TD>
      <pre>$body</pre>
    </TD> 	
  </TR>
</table>");
I have also tried using print and printf, but I had a feeling that neither one would help.

I thought html tables automatically word wraps? I know there is a tag for nowrap, but I am not using it.

Here is what the above code source looks like when viewed.

Code:
<table width="100 border="1">
  <TR>
    <TD>
      <pre>adf sdf asd f asdf  sdaf  asdf  asdf  sad f sad f asd f asd f as df s adf  sadf  sd f asd f sa df a sdf  sad f asd f sd f  asd f asd f sad f  sad f sd f  sad f s df  sd f s adf  sd f as df  s df  asd f  sad f as df asd</pre>
    </TD> 	
  </TR>
</table>
The "adf sdf asd f" is obvious just bogus data I typed to test it.

To me it looks like it should work? i.e. word wrap. Could there be special characters I am not seeing? Could I have stripped away any characters when i entered the data into the MySql database? Why? Why? Why? Why?

I have also tried without the <pre></pre> tags and it did the same.

Toe
__________________
toe_cutter is offline   Reply With Quote
Old 09-06-2002, 07:12 AM   #2 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
remove the pre tags and then refresh the page..

you probaly had it cached.
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 09-06-2002, 07:19 AM   #3 (permalink)
toe_cutter
Code Monkey
 
Join Date: Aug 2002
Location: Boston, MA
Posts: 79
toe_cutter is on a distinguished road
Send a message via ICQ to toe_cutter Send a message via AIM to toe_cutter Send a message via Yahoo to toe_cutter
hmmm...cache

Well, it is word wrapping now, but I think my tables have gotten f'd up since I have been messing with them.

Toe
__________________
toe_cutter is offline   Reply With Quote
Old 09-06-2002, 07:29 AM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,471
sde is on a distinguished road
yeah, admin is probably right, .. your browser probably cached the query with the <pre> tag and you just needed to refresh the page. In your example, only the <pre> tag would cause that.
sde is offline   Reply With Quote
Old 09-06-2002, 07:29 AM   #5 (permalink)
toe_cutter
Code Monkey
 
Join Date: Aug 2002
Location: Boston, MA
Posts: 79
toe_cutter is on a distinguished road
Send a message via ICQ to toe_cutter Send a message via AIM to toe_cutter Send a message via Yahoo to toe_cutter
All set now, thank you Mister Admin, Sir. I'm a dummy..Cache?!?!?!

Toe
__________________
toe_cutter is offline   Reply With Quote
Old 09-06-2002, 07:31 AM   #6 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,471
sde is on a distinguished road
if you are using internet explorer, you can go to Tools -> Internet Options -> Settings , and set it to Check for new versions of the page everytime you visit.
sde is offline   Reply With Quote
Old 09-06-2002, 11:48 AM   #7 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
sometimes that doesnt work perfect...

Ctrl + F5 should do it in IE
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 09-10-2002, 10:17 AM   #8 (permalink)
toe_cutter
Code Monkey
 
Join Date: Aug 2002
Location: Boston, MA
Posts: 79
toe_cutter is on a distinguished road
Send a message via ICQ to toe_cutter Send a message via AIM to toe_cutter Send a message via Yahoo to toe_cutter
What does CTRL + F5 do that F5 doesn't?

Toe
__________________
toe_cutter is offline   Reply With Quote
Old 09-10-2002, 12:25 PM   #9 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
ctrl forces ie to download all the files on the page again
__________________


Urban Clothing
Admin is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[MySQL] blob vs text redhead PHP 2 03-29-2004 11:15 PM
and on to mysql .. sde Linux / BSD / OS X 2 01-18-2003 07:39 PM


All times are GMT -8. The time now is 03:59 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting