Working with the TEXT datatype in MySQL

Reply

Join Date: Dec 2007
Posts: 65
Reputation: CodeBoy101 is an unknown quantity at this point 
Solved Threads: 0
CodeBoy101's Avatar
CodeBoy101 CodeBoy101 is offline Offline
Junior Poster in Training

Working with the TEXT datatype in MySQL

 
0
  #1
Nov 30th, 2008
Hi, I was wondering how I would enter something like a paragraph in MySQL if you declared it as type TEXT.

So how would I enter something like:

John 3:16 (New International Version)

16" For God so loved the world that he gave his one and only Son,[a] that whoever believes in him shall not perish but have eternal life.


into a field of type TEXT?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,162
Reputation: dickersonka will become famous soon enough dickersonka will become famous soon enough 
Solved Threads: 138
dickersonka dickersonka is offline Offline
Veteran Poster

Re: Working with the TEXT datatype in MySQL

 
0
  #2
Nov 30th, 2008
just a normal insert will work

what are you inserting from?
Custom Application & Software Development
www.houseshark.net
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 65
Reputation: CodeBoy101 is an unknown quantity at this point 
Solved Threads: 0
CodeBoy101's Avatar
CodeBoy101 CodeBoy101 is offline Offline
Junior Poster in Training

Re: Working with the TEXT datatype in MySQL

 
0
  #3
Dec 1st, 2008
Originally Posted by dickersonka View Post
just a normal insert will work

what are you inserting from?
i'm running the instruct6ion from a text file using the source command, but why is it when I try to print the record it comes out in one line?
Can I make it print several line for that one row?

Like:
+-----------------------+
|Line 1 |
|Line 2 |
+-----------------------+

for one row?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,162
Reputation: dickersonka will become famous soon enough dickersonka will become famous soon enough 
Solved Threads: 138
dickersonka dickersonka is offline Offline
Veteran Poster

Re: Working with the TEXT datatype in MySQL

 
0
  #4
Dec 1st, 2008
you gotta remember formatted text is specific to the application, i'm assuming from a text file it is CR LF, but in html you will need to use <P>, when you are running the select, what are you outputting it in? query browser, web page?
Custom Application & Software Development
www.houseshark.net
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 65
Reputation: CodeBoy101 is an unknown quantity at this point 
Solved Threads: 0
CodeBoy101's Avatar
CodeBoy101 CodeBoy101 is offline Offline
Junior Poster in Training

Re: Working with the TEXT datatype in MySQL

 
0
  #5
Dec 1st, 2008
I'm simply loading values into a table [via the text file SQL is reading syntax]. and the language is MySQL. when I said that the output comes out in one line I meant when runnign SQL.
How can I fix this?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,162
Reputation: dickersonka will become famous soon enough dickersonka will become famous soon enough 
Solved Threads: 138
dickersonka dickersonka is offline Offline
Veteran Poster

Re: Working with the TEXT datatype in MySQL

 
0
  #6
Dec 1st, 2008
first we have to figure out where the problem is at

is the data stored with the cr lf's and not outputting correctly?
or not stored with formatting (incorrectly) and therefore outputting properly?
Custom Application & Software Development
www.houseshark.net
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MySQL Forum


Views: 1021 | Replies: 5
Thread Tools Search this Thread



Tag cloud for MySQL
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC