<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1022205" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1022205</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/tinytext-key#comment-1136871</link>
    <description> &lt;p&gt;I found the explanation you quoted to be a bit confusing.  Especially this part: &quot;first number continues to represent the storage requirements for the value in bytes&quot;  I&#039;m not sure how floats are stored, so I can&#039;t calculate the number of bytes required.&lt;/p&gt;
&lt;p&gt;But after reading the FLOAT(precision) and FLOAT(M,D) descriptions (here: &lt;a href=&quot;http://www.mysql.com/doc/en/Column_types.html&quot; class=&quot;bb-url&quot;&gt;6.2 Column Types&lt;/a&gt;), FLOAT(5,2) sounds right.&lt;/p&gt;
 </description>
     <pubDate>Wed, 27 Aug 2003 06:42:52 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1136871 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/tinytext-key#comment-1136863</link>
    <description> &lt;p&gt;and from mysql&#039;s online manual....&lt;br /&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;Quote: The FLOAT type is used to represent approximate numeric datatypes. The SQL-92 standard allows an optional specification of the precision (but not the range of the exponent) in bits following the keyword FLOAT in parentheses. The MySQL implementation also supports this optional precision specification. When the keyword FLOAT is used for a column type without a precision specification, MySQL uses four bytes to store the values. A variant syntax is also supported, with two numbers given in parentheses following the FLOAT keyword. With this option, the first number continues to represent the storage requirements for the value in bytes, and the second number specifies the number of digits to be stored and displayed following the decimal point (as with DECIMAL and NUMERIC). When MySQL is asked to store a number for such a column with more decimal digits following the decimal point than specified for the column, the value is rounded to eliminate the extra digits when the value is stored. &lt;/blockquote&gt;&lt;/p&gt;
&lt;p&gt;so i want float(5,2) .. hmm.. wonder if it&#039;d be better to do the multiplication thing instead... look like that&#039;d be beneficial for storage, but i think i&#039;ll go with float since it&#039;s easier to use in the actual application if i just pull it out as is.unlesssomone has some comment on this about something i&#039;m missing.&lt;/p&gt;
 </description>
     <pubDate>Tue, 26 Aug 2003 20:46:58 +0000</pubDate>
 <dc:creator>m3rajk</dc:creator>
 <guid isPermaLink="false">comment 1136863 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/tinytext-key#comment-1136859</link>
    <description> &lt;p&gt;yeah. the php books seem to help but i don&#039;t like the mysql one. too many things i can&#039;t find. i&#039;m about to go off to the mysql website and see if they describe floats better. i want to keep gmt offset and since it can range from -12 to +12 with one number being somethig like 5.75 (have the exact elsewhere) a float is needed to keep that unless i use a small int and multiple everything by 100, which is something i&#039;m wondering if it&#039;d be beter to do since they are half the size of a float. i&#039;m not sure if i should call it with float(4,2) or float(3,2) since sql will probably look at it as -12.00 to +12.00&lt;/p&gt;
 </description>
     <pubDate>Tue, 26 Aug 2003 20:14:09 +0000</pubDate>
 <dc:creator>m3rajk</dc:creator>
 <guid isPermaLink="false">comment 1136859 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/tinytext-key#comment-1136850</link>
    <description> &lt;p&gt;Oh, and I&#039;d throw out that O&#039;Reilly book.&lt;/p&gt;
 </description>
     <pubDate>Tue, 26 Aug 2003 17:03:23 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1136850 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/tinytext-key#comment-1136849</link>
    <description> &lt;p&gt;I recommend using varchar(255) over tinytext.&lt;/p&gt;
&lt;p&gt;varchar can be index easily, and var-char is short for variable length character field.  Meaning a varchar(255) isn&#039;t always 255 bytes long.  A varchar(255) may store up to 255 bytes of data.  The actuall field length is 1 byte plus the length of the data stored.  (I believe the extra byte preceeds the data and is read by mysql as an integer representation of the length of the data stored, or an offset for the next field)&lt;/p&gt;
&lt;p&gt;A char() field, on the other hand.  Is a fixed length field.  A char(255) will always be 255 bytes long, irregardless of the length of data being stored in it.&lt;/p&gt;
&lt;p&gt;To index off of text or blob fields, you need to specify how many bytes into the field mysql should use for the index.  This is because it is very inefficient to index the whole field (especially when we&#039;re talking kilobyte, megabyte, or even gigabyte field lengths).&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;CREATE TABLE forums(&lt;br /&gt;&amp;nbsp; forum_id tinyint unsigned NOT NULL auto_increment PRIMARY KEY,&lt;br /&gt;&amp;nbsp; title tinytext NOT NULL,&lt;br /&gt;&amp;nbsp; blurb tinytext,&lt;br /&gt;&amp;nbsp; access tinyint unsigned NOT NULL,&lt;br /&gt;&amp;nbsp; threads smallint,&lt;br /&gt;&amp;nbsp; last_post_auth varchar(15) NOT NULL,&lt;br /&gt;&amp;nbsp; last_post_time time default &amp;#039;00:00:00&amp;#039; NOT NULL,&lt;br /&gt;&amp;nbsp; INDEX title (title(25))&lt;br /&gt;) TYPE=MyISAM;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Tue, 26 Aug 2003 17:02:11 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1136849 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
