<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DOC776.org &#187; mysql</title>
	<atom:link href="http://www.doc776.org/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doc776.org</link>
	<description>This is the era of information.</description>
	<lastBuildDate>Thu, 16 Jul 2009 17:29:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Easy Image Class</title>
		<link>http://www.doc776.org/2009/06/easy-image-class/</link>
		<comments>http://www.doc776.org/2009/06/easy-image-class/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 03:22:27 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Class]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[gd]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[resize]]></category>
		<category><![CDATA[thumbnail]]></category>

		<guid isPermaLink="false">http://www.doc776.org/?p=127</guid>
		<description><![CDATA[I needed something simple to grab images from MySQL database and display them. Slowly it grew into a very handy class.
This class can be used to manipulate images stored in files or in a MySQL database. It can read images from files and store them in a MySQL database table, and vice-versa. The class can [...]]]></description>
			<content:encoded><![CDATA[<p>I needed something simple to grab images from MySQL database and display them. Slowly it grew into a very handy class.</p>
<p>This class can be used to manipulate images stored in files or in a MySQL database. It can read images from files and store them in a MySQL database table, and vice-versa. The class can also convert images between GIF, JPEG and PNG formats, as well resize the images to create thumbnails.</p>
<p>Documentation:<br />
Coming Soon&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doc776.org/2009/06/easy-image-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL BLOB Field</title>
		<link>http://www.doc776.org/2009/06/mysql-blob-field/</link>
		<comments>http://www.doc776.org/2009/06/mysql-blob-field/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 23:34:21 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.doc776.org/?p=106</guid>
		<description><![CDATA[Simple description on maximum storing size for different BLOB fields in MySQL database.]]></description>
			<content:encoded><![CDATA[<p>When I needed to know some basic information on BLOBs, I had very hard time finding it. Nearly every site I could not entirely understand at first glance. A BLOB is a &#8220;binary large object&#8221;; when using phpMyAdmin, you will see an upload form to insert a BLOB. Here is the maximum file sizes you can store in different blob fields in MySQL database.</p>
<table border="0">
<tbody>
<tr>
<th>Type</th>
<th colspan="3">Sizes</th>
</tr>
<tr>
<td>TINYBLOB</td>
<td colspan="3">256 Bytes</td>
</tr>
<tr>
<td>BLOB</td>
<td>65,536 Bytes</td>
<td colspan="2">64 KB</td>
</tr>
<tr>
<td>MEDIUMBLOB</td>
<td>16,777,216 Bytes</td>
<td>16,384 KB</td>
<td>16 MB</td>
</tr>
<tr>
<td>LARGEBLOB</td>
<td>4,294,967,296 Bytes</td>
<td>4096 MB</td>
<td>4 GB</td>
</tr>
</tbody>
</table>
<p>Easy way to calculate exact sizes:<br />
3 GB = 3 * 1024 * 1024 * 1024<br />
4 MB = 4 * 1024 * 1024<br />
2 KB = 2 * 1024</p>
<p>In many manuals for MySQL the limit is stated in characters, for BLOBs it is: 1 Character = 1 Byte</p>
<p>If you store a 2 MB picture in a MEDIUMBLOB and then change the field to BLOB, the picture will be cut off. Here is what you will get if you try opening teh image with gd library after fetching from database:</p>
<table>
<tr>
<td>
<img class="aligncenter size-thumbnail wp-image-119" title="php" src="http://www.doc776.org/wp-content/uploads/php-150x150.jpg" alt="php" width="150" height="150" /></td>
<td>
<img class="aligncenter size-thumbnail wp-image-118" title="php-cut-off" src="http://www.doc776.org/wp-content/uploads/php-cut-off-150x150.jpg" alt="php-cut-off" width="150" height="150" /></td>
</tr>
</table>
<p>On the left is original uploaded or inserted image and on the right is what was actually stored from the inserted one and outputted with PHP GD library; using imagecreatefromstring() to  make the image from the string fetched from the database.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doc776.org/2009/06/mysql-blob-field/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
