Forum Moderators: coopster

Message Too Old, No Replies

Problem in handling long text in MYSQL table

         

hswaseer

1:58 pm on Feb 12, 2004 (gmt 0)

10+ Year Member



Hi

i am making a database driven website which is working fine
My web page contains lot of text and it is very diffcult to upadate its content from the text_field of MQSQL table. As i have to read each line again and again to update it.

I have alloted parent_id to each category_id in my database table and thus retreving results from it...

I want to know what should i do to handle this long text ...such as if i am able to make a seperate text file for each of my html_body variable and somehow include that file to a webpage when i select a particular parent_id from my wepage.

How should i go about it

Thanks

HS

coopster

9:57 pm on Feb 12, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



The text_field that you are referring to -- of what type is the column? Are you aware that you can have column types [mysql.com], such as
TEXT, MEDIUMTEXT, AND LONGTEXT
, that will store a sizable amount of characters?

Why do you have to read each line again and again to update it? Maybe it would help if you described the table a bit...

hswaseer

5:58 am on Feb 13, 2004 (gmt 0)

10+ Year Member



Hi

Thanks for reply..

Yes I know about the long_text option and i am using that....I am using PHP_MYADMIN to insert records and into my database ...

Now suppose if i have to add a particular line in my text_box...i have to locate the position of that line to add another line from that little viewable area of text box.

Moreover the PHP_MYDMIN also shows a note that
" Because of its length, this field might not be editable "

Thanks

HS

tomda

6:45 am on Feb 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




I am using PHP_MYADMIN to insert records and into my database. Now suppose if i have to add a particular line in my text_box...i have to locate the position of that line to add another line from that little viewable area of text box. Moreover the PHP_MYDMIN also shows a note that
" Because of its length, this field might not be editable "

PHPMYadmin is not very stable with long text data as it (the version I have) still use GET to pass data.
The best thing is to have some PHP pages (like an administration console - edit, delete, modify, etc..) and use the POST (and NOT get).

My advice for long text data -> FORGET PHPADMIN!
Even when uploading datas in your database server-side using PHPadmin (if your server has), it may crash depending of your connection speed, their PHPadmin version and their time out setting.

But it data are very very long, why can't you just split it in two or three columns?

Tommy

coopster

1:23 pm on Feb 13, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I am using PHP_MYADMIN to insert records and into my database ...

OK, now I understand. I have never used phpMyAdmin. I roll my own code and I use a TEXTAREA for handling those column types. You get a lot more screen real estate. Maybe this is an option for you?