Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: open
Here is my situation: I have designed and am in the process of creating a mid-sized website that will serve up a database of poems. (Eventually it will become fairly large) I've seen sites that do what I'm trying to do, but I'm planning on doing it much better than I've seen it done before.
I have created a MySql database and created the necessary tables which include an author, poem, and collection table. I also learned the basics of PHP and will be using that do connect to the database and work with the data.
My question(s):How do I import, manage and edit the poems in my database most efficiently?
I tried using the sql command LOAD DATA INFILE, and that works very well for most information but the poems table, because the field that contains the actual poem (a TEXT datatype) takes a long time to turn into a string and edit it onto one long, long line. It would also be a super big pain to edit (say if there was a typo) And to do this for say, 1000 poems would be awful. It would be so much easier to copy and past into .html files... (which I don't want to do, as I want to build a dynamic site)
So with the previous information in mind,
Is there any good software that other sites use to easily connect to their database and input and edit large amounts of text? Or do I have to program a admin-access-only php pages that will do that stuff?
Sorry the question is kinda long... hope I didn't scare anyone off! Thanks for your help in advance!
Have you thought about XML? If you like working in static files, but want the site to be dynamic, you could copy them all into XML files and edit them that way, then write a script to crawl the directory and parse the XML into the DB for use on the site.
you can manage a list of flat files and meta data in a spreadsheet.
generate a csv or tsv file from the spreadsheet.
write a script to process that file.
each row is a poem and one of the fields is the file name containing that poem.
open and read the poem file into a variable and use that in your insert sql statement along with other fields for author, title, etc...
not too hard to build a couple admin pages, basic to begin with
add new record -
just build your form and then worry about the insert script
update record -
make a page with a list of records adn an edit link
you can use the same form and just load old data based on a GET string
as long as you can trust yourself you don't need much error checking right away
then just use htaccess to protect it for now
Let me rephrase my question - I need an easy data-entry and editing system (or content management system. It needs to especially work well with LONG text datafields. For instance, the author bio as well as the actual poem is a datatype of TEXT in mySql. Since it has to be broken into paragraphs, it makes it very hard to edit using just a long string. (Very frustrating as well...) Do you know if PHPadmin is accomadating like that?
if you build it yourself a textarea using nl2br would make your paragraphs
you really could have an insert script done in an hour or so. You could probably do the insert and update in a couple hours even with beginner level php skills. It doesn't have to be pretty, it just has to work.
It is only for you after all ;)