Hello Everyone! Quick question here... Alright, say I have a MySQL database setup that will store a whole pile of short stories or poems. What kind of data column do I use to store that data in the table that has information about the writing? Just a huge VARCHAR (?) I mean, I doubt there will be too many that will be over 25,000 characters... but is that the best way to do that? Also, what is the best way to INPUT this data? I tried LOAD DATA INFILE for a couple entries, but the problem with that is that you've got this HUGE long string, and it's virtually impossible to edit. Anyone know the proper way of doing any of this??? I THANK-YOU in advance!!!!
Well for the column type, you would use "TEXT". Your second part I don't udnerstand, do you want to input data to the datbase or retrieve it from the db?
TEXT, eh? hmmm.... Yes, I need to first input it into the db. I would like to also know how I control where paragraphs end and such. I assume with <br /> tags... and what is the best way to format it? Thanks.
Just leave it as a raw string, and use <p> tags around paragraphs, and in your css have something like: p { padding:15px; } Code (markup): Eliminates the need for br tags. Your PHP could go something like this: <?php $article = "Article content"; $query = "INSERT INTO table_name (column_name) VALUES ('".mysql_real_escape_string($article)."')"; ?> PHP: Something like that.
Er... well, then I would have to manually insert <p> </p> tags into the TEXT string right? But yes, that's a better idea than using 2 <br /> tags per paragraph. I didn't quite understand about what is the best way to insert 100s of these poems and stories, and to format them at the same time. Are you meaning creating a Content Managment System from scratch? I already have them in word (doc and txt) files, so I was hoping for an easy way to insert them into my database? Possibly with LOAD DATA INFILE??? Then I could also save those statements for easy re-build.
Thanks, but I want to set this site up as a dynamic database driven website... I already makes lots of HTML sites, but this isn't what I want in this instance.
That's what I meant. Take the posted data from the qysiwyg editor add it into a database as a binary format. Then just print(); Simple mate.