master_bacarra
Apr 17 2006, 11:24 AM
| | hey everyone! i just started using mysql so i could integrate it on my site. i'm trying to create a comment section and store the data on mysql. i've defined my table having a field type of varchar with max value 5000. but when i created it on phpmyadmin on my free hosting account, it said that the maximum value for a varchar is just 255. it said that i should use a blob. what is it and how can i access the data using php? i've searched from the net and it said that blob is used for images and document data. and i also found out that the data stored in a blob is a byte... so if i can use blob, how can i convert a text/string to a blob and vice versa. hmm... i'm confused...
oh make that binary, not byte. sorry. |
Reply
WindAndWater
Apr 17 2006, 04:13 PM
Just consider blobs to be longer versions of varchars and use them in exactly the same way. In the phpAdmin or the mysqlAdmin (I don't remember which, as I usually do it manuall) you can change the type of field from varchar to blob. Do that, and then treat the rest exactly the same.
Reply
Inspiron
Apr 17 2006, 05:43 PM
MySQL treat data unique. Hence there is a difference between Blob and Text. Text simply means a text string stored as orginal, not in binary, whereas a blob is a text string stored as a binary. You can find more information about data types on the MySQL deocumentations. http://dev.mysql.com/doc/refman/5.0/en/blob.html
Reply
OpaQue
Apr 18 2006, 12:32 AM
BLOB and TEXT type as explained in MySQL Language Reference. QUOTE A BLOB is a binary large object that can hold a variable amount of data. The four BLOB types TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB differ only in the maximum length of the values they can hold.
The four TEXT types TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT correspond to the four BLOB types and have the same maximum lengths and storage requirements. The only difference between BLOB and TEXT types is that sorting and comparison is performed in case-sensitive fashion for BLOB values and case-insensitive fashion for TEXT values. In other words, a TEXT is a case-insensitive BLOB.
Reply
master_bacarra
Apr 18 2006, 02:44 AM
so i could use TEXT instead of BLOB in storing the comments? if so, how long is the maximum length for a TEXT in the free hosting accounts? and if ever i am to use a BLOB, how can i convert it to a non-binary form using php and vice versa?
Reply
Recent Queries:--
what is a blob - 3.26 hr back. (1)
-
mysql blob data type - 7.12 hr back. (1)
-
mysql delete blob - 14.85 hr back. (1)
-
mysql difference blob longblob - 16.41 hr back. (1)
-
mysql blob - 18.13 hr back. (1)
-
mysql convert blob to text - 14.20 hr back. (3)
-
php mysql blob to string - 26.09 hr back. (1)
-
convert a blob back into data php - 38.11 hr back. (1)
-
difference between blob and text - 42.67 hr back. (1)
-
maximum size of blob mysql - 44.10 hr back. (1)
-
"mysql" "string" "blob" - 48.48 hr back. (1)
-
mysql converting a blob to text - 58.44 hr back. (1)
-
mysql text longtext blob longblob - 60.71 hr back. (1)
-
how to use blobs mysql - 62.76 hr back. (1)
Similar Topics
Keywords : blob, mysql
- Mysql Changing Date Format
Need a bit of help changi ng the date format in a table (3)
2 Mysql Operations Cause Delay?
(1) I'm doing an Inventory system using PHP and MySQL. It's almost done now but I've been
having a problem with this particular code. This is a function that does two things. It updates a
table with edited values and then inserts values to another table. It's working fine except
that the status bar of my browser indicates that the page (with this function) is still loading when
in fact the function has been terminated and it did its job already (I've checked the dbase) and
there's no command after calling the function. Could the delay be because ....
Cheat Sheets
PHP, MySQL, CSS, RGB Hex Color, mod_rewrite (4) here are some cheat sheets for PHP, MySQL, CSS, RGB Hex Color, and mod_rewrite. choose one, choose
all. /smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /> can be printed as a
handy reference guide when you are working with any of the above-mentioned interests. just let it
reside within your reach in your desk, and you'll save some time looking up things online. makes
a webmaster's life a little bit easier. /smile.gif' border='0' style='vertical-align:middle'
alt='smile.gif' /> enjoy! http://www.ilovejackdaniels.com/cheat-sheets/ ....
Delphi 2005 + Mysql
how to connect mysql with delphi 2005? (2) Anyone knows how to connect mysql with delphi 2005? Thanks! /smile.gif' border='0'
style='vertical-align:middle' alt='smile.gif' /> ....
How Do I Delete Info From Mysql Database Through My Cpanle?
- help (1) I want to delete some info in a MySql database. Can I do that through my cPanle? if not, I need to
know even through command prompt. Thanks\ nickmealey ....
Running Php/mysql/html Offline
(11) Is there programs or a way to run PHP/CGI/MySQL/HTML and other web programming languages offline? I
am trying to learn website design, and uploading accumulates a very precious part of my time, and
being able to run the modified file offline would be a -very- great timesaver. Is there anyway to
install PHP, MySQL and the other languages to your computer so that you may work on things offline,
like I said?....
Looking for blob, mysql
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for blob, mysql
*MORE FROM TRAP17.COM*
|
advertisement
|
|