Forum Moderators: coopster

Message Too Old, No Replies

php myadmin

         

dave1236

3:12 pm on Aug 30, 2006 (gmt 0)

10+ Year Member



All:

I am creating a new database to store my links and files rather than simply updating them in an include file.

I use phpmyadmin and am having problems getting the database to accept a link that is over 200 characters long (some of them are extremely long, as some of them are deep in my folder list, and some include a couple of paragraphs of text to display.

Any thoughts on how to structure my DB to accept larger files and links.

Thanks!

Psychopsia

3:22 pm on Aug 30, 2006 (gmt 0)

10+ Year Member



Can you post your table structure? The fields type are VARCHAR or TEXT?

dreamcatcher

3:25 pm on Aug 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



dave1236,

There's also LONGTEXT and MEDIUMTEXT.

This link may be of some help:

[dev.mysql.com...]

dc

dave1236

3:31 pm on Aug 30, 2006 (gmt 0)

10+ Year Member



I tried to create them in both TEXT and VARCHAR. Every time I went above 200 chars, I got an error message, and the structure would not save.

barns101

4:16 pm on Aug 30, 2006 (gmt 0)

10+ Year Member



varchar fields have a maximum length of 255 characters, but text fields are a lot longer (although not unlimited).

You may have unwittingly set the maximum length of your varchar or text field as 200 characters when creating the table. You can change the field length at any time, using the "Change" link when viewing the table structure.

dave1236

4:19 pm on Aug 30, 2006 (gmt 0)

10+ Year Member



You may be right. As I have just created this table, I think I will simply delete the entire thing, and recreate it, starting with the field defined as text.

Thanks

Psychopsia

4:39 pm on Aug 30, 2006 (gmt 0)

10+ Year Member



You can change the field to "text" without recreating the entire table.

Change from "varchar" to "text" and remove the length of the field, when editing.

dave1236

6:41 pm on Aug 30, 2006 (gmt 0)

10+ Year Member



i tried again to simply remove the length in the table - i got error messages.

I recreated the table, starting with a text definition, no max length, and it worked!

Thanks all!