Jump to content


Photo

text rows unreadable?


Best Answer Psycho, 28 March 2013 - 06:13 PM

Because a BLOB/TEXT field type is meant for a very large amount of data. PHPMyAdmin is trying to help you by not automatically displaying what would likely be a large amount of text in a table output - which would likely make the page unreadable. Let's say you were storing the text for an entire report in that field. It would be stupid to output that in the DB management display.

 

If you are not storing LARGE amounts of text in that field you should by using something like VARCHAR with a limit on the number of characters.

 

http://help.scibit.c...ield_Types.html

Go to the full post


  • Please log in to reply
4 replies to this topic

#1 Manixat

Manixat

    Advanced Member

  • Members
  • PipPipPip
  • 166 posts

Posted 28 March 2013 - 05:21 PM

Hello mysql freaks,

 

I have a few columns of type TEXT. Whenever a record is saved all those fields become [BLOB - BLABLA] and I can not see what is in that field. Why is that and how can I reveal the string behind that label or whatever it is ?



#2 trq

trq

    Advanced Member

  • Administrators
  • 30,980 posts
  • LocationSydney, Australia.

Posted 28 March 2013 - 05:38 PM

Can we see the output of:
show create table tablename
Don't forget to tell use the name of the columns that are giving you grief.

http://thorpesystems.com | http://proemframework.org | http://github.com/trq

SmtpCatcher - A very simple mock sendmail useful for testing PHP mail scripts.
OPM - My Linux package manager.


#3 Manixat

Manixat

    Advanced Member

  • Members
  • PipPipPip
  • 166 posts

Posted 28 March 2013 - 05:45 PM

In my attempt to for fulfill your request I accidentally solved my problem. See in phpmyadmin, right over where the table starts ( in browsing mode ) there's a pop-up-like menu labeled Options where I checked Show BLOB contents and the values appeared. But still I'm interested to understand what's the purpose of those not being shown? I mean, why is there an option like that?


Edited by Manixat, 28 March 2013 - 05:51 PM.


#4 Psycho

Psycho

    Advanced Member

  • Gurus
  • 10,746 posts
  • LocationCanada

Posted 28 March 2013 - 06:13 PM   Best Answer

Because a BLOB/TEXT field type is meant for a very large amount of data. PHPMyAdmin is trying to help you by not automatically displaying what would likely be a large amount of text in a table output - which would likely make the page unreadable. Let's say you were storing the text for an entire report in that field. It would be stupid to output that in the DB management display.

 

If you are not storing LARGE amounts of text in that field you should by using something like VARCHAR with a limit on the number of characters.

 

http://help.scibit.c...ield_Types.html


Edited by Psycho, 28 March 2013 - 06:16 PM.

The quality of the responses received is directly proportional to the quality of the question asked.

I do not always test the code I provide, so there may be some syntax errors. In 99% of all cases I found the solution to your problem here: http://www.php.net

#5 Manixat

Manixat

    Advanced Member

  • Members
  • PipPipPip
  • 166 posts

Posted 28 March 2013 - 06:18 PM

Because a BLOB/TEXT field type is meant for a very large amount of data. PHPMyAdmin is trying to help you by not automatically displaying what would likely be a large amount of text in a table output - which would likely make the page unreadable. Let's say you were storing the text for an entire report in that field. It would be stupid to output that in the DB management display.

 

If you are not storing LARGE amounts of text in that field you should by using something like VARCHAR with a limit on the number of characters.

 

http://help.scibit.c...ield_Types.html

 

Makes perfect sense. I would use VARCHAR because most of my records will be less than even 100 characters, but every now and then a longer one will be inserted and therefore I need to use the TEXT type, unfortunately. Unless there's any other way of allowing exceptions but I strongly doubt that. Anyway thank you for your replies!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com