DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   MySQL (http://www.daniweb.com/forums/forum126.html)
-   -   Working with the TEXT datatype in MySQL (http://www.daniweb.com/forums/thread160126.html)

CodeBoy101 Nov 30th, 2008 3:22 pm
Working with the TEXT datatype in MySQL
 
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?

dickersonka Nov 30th, 2008 8:24 pm
Re: Working with the TEXT datatype in MySQL
 
just a normal insert will work

what are you inserting from?

CodeBoy101 Dec 1st, 2008 11:07 am
Re: Working with the TEXT datatype in MySQL
 
Quote:

Originally Posted by dickersonka (Post 747621)
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?

dickersonka Dec 1st, 2008 11:15 am
Re: Working with the TEXT datatype in MySQL
 
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?

CodeBoy101 Dec 1st, 2008 1:28 pm
Re: Working with the TEXT datatype in MySQL
 
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?

dickersonka Dec 1st, 2008 1:35 pm
Re: Working with the TEXT datatype in MySQL
 
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?


All times are GMT -4. The time now is 10:05 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC