aeris130 Posted February 22, 2006 Share Posted February 22, 2006 I'm currently trying to learn about MySQL in order to get rid of about 350 php-files currently plaguing my host.I've noticed that there's a lot of tutorials etc about storing contacts, passwords, etc, but I'm also interested in storing my entire content, including extensive articles.So, first of all, how much space would be required for this? Also, are there any tutorials specifically regarding this, or can most tutorials about retrieving info from MySQL be applied?In other words, is there anything special that I should keep in mind when storing extensive content, compared to names, phonenumbers etc? Quote Link to comment https://forums.phpfreaks.com/topic/3531-content-in-mysql-newbie-question/ Share on other sites More sharing options...
fenway Posted February 22, 2006 Share Posted February 22, 2006 Assuming you're just talking about text files (and not binary data), my recommendation would be to keep them in a separate table. TEXT/LONGTEXT fields are not fixed-width, so they may slow down queries on existing fixed-width tables. Otherwise, there's nothing special about storing 65K of text in one field vs storing 250 characters. Quote Link to comment https://forums.phpfreaks.com/topic/3531-content-in-mysql-newbie-question/#findComment-12186 Share on other sites More sharing options...
wickning1 Posted February 22, 2006 Share Posted February 22, 2006 You shouldn't have any problems storing HTML in the database, although storing PHP code is slightly more involved (if you want it to be executed when it comes out).One of the nice things about storing articles in MySQL is you can use COMPRESS() and UNCOMPRESS() to transparently save space. Some MySQL installations may not have support for it though. Quote Link to comment https://forums.phpfreaks.com/topic/3531-content-in-mysql-newbie-question/#findComment-12195 Share on other sites More sharing options...
fenway Posted February 22, 2006 Share Posted February 22, 2006 True enough... again, it simply means a performance hit every time you want to access said article. Is space isn't an issue (which it usually isn't) and the space savings is minimal, they there's no need to bother in the general case. Quote Link to comment https://forums.phpfreaks.com/topic/3531-content-in-mysql-newbie-question/#findComment-12200 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.