<?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>Symfony e Internet &#187; Mysql</title>
	<atom:link href="http://www.dcastello.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dcastello.com</link>
	<description>Conociendo la web</description>
	<lastBuildDate>Mon, 11 Jul 2011 16:03:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Crear base datos en mysql con codificacion utf8</title>
		<link>http://www.dcastello.com/23/04/2010/crear-base-datos-en-mysql-con-codificacion-utf8/</link>
		<comments>http://www.dcastello.com/23/04/2010/crear-base-datos-en-mysql-con-codificacion-utf8/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 15:35:23 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.dcastello.com/?p=75</guid>
		<description><![CDATA[Ahí va como decirle a mysql que la base de datos que queremos crear está en UTF-8. Y como siempre se me olvida que mejor lugar que este para apuntarlo 1 CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;]]></description>
			<content:encoded><![CDATA[<p>Ahí va como decirle a mysql que la base de datos que queremos crear está en UTF-8.<br />
Y como siempre se me olvida que mejor lugar que este para apuntarlo <img src='http://www.dcastello.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">DATABASE</span> dbname <span style="color: #993333; font-weight: bold;">CHARACTER</span> <span style="color: #993333; font-weight: bold;">SET</span> utf8 <span style="color: #993333; font-weight: bold;">COLLATE</span> utf8_general_ci;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.dcastello.com/23/04/2010/crear-base-datos-en-mysql-con-codificacion-utf8/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mysql load data infile y ficheros csv</title>
		<link>http://www.dcastello.com/14/01/2010/mysql-load-data-infile-y-ficheros-csv/</link>
		<comments>http://www.dcastello.com/14/01/2010/mysql-load-data-infile-y-ficheros-csv/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 09:01:12 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.dcastello.com/?p=12</guid>
		<description><![CDATA[Si necesitamos cargar un fichero csv en mysql, en lugar de hacer un script en php que recorra el fichero e inserte los datos en nuestra tabla. Mysql nos facilita el comando load data infile. 1 2 3 4 5 LOAD DATA INFILE '/tmp/mi-fichero.csv' INTO TABLE my_table FIELDS TERMINATED BY ',' ENCLOSED BY '&#34;' LINES [...]]]></description>
			<content:encoded><![CDATA[<p>Si necesitamos cargar un fichero csv en mysql, en lugar de hacer un script en php que recorra el fichero e inserte los datos en nuestra tabla. Mysql nos facilita el comando <strong>load data infile</strong>.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">LOAD</span> <span style="color: #993333; font-weight: bold;">DATA</span> <span style="color: #993333; font-weight: bold;">INFILE</span> <span style="color: #ff0000;">'/tmp/mi-fichero.csv'</span>
<span style="color: #993333; font-weight: bold;">INTO</span> <span style="color: #993333; font-weight: bold;">TABLE</span> my_table
<span style="color: #993333; font-weight: bold;">FIELDS</span> <span style="color: #993333; font-weight: bold;">TERMINATED</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #ff0000;">','</span> <span style="color: #993333; font-weight: bold;">ENCLOSED</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #ff0000;">'&quot;'</span>
<span style="color: #993333; font-weight: bold;">LINES</span> <span style="color: #993333; font-weight: bold;">TERMINATED</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span>
<span style="color: #66cc66;">&#40;</span>col1<span style="color: #66cc66;">,</span>col2<span style="color: #66cc66;">,...,</span>coln<span style="color: #66cc66;">&#41;</span></pre></td></tr></table></div>

<p>Más información del comando en la <a title="load data" href="http://dev.mysql.com/doc/refman/5.0/es/load-data.html" target="_blank">web oficial de mysql</a>:</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dcastello.com/14/01/2010/mysql-load-data-infile-y-ficheros-csv/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Inicializar un campo auto_increment</title>
		<link>http://www.dcastello.com/09/01/2010/inicializar-un-campo-auto_increment/</link>
		<comments>http://www.dcastello.com/09/01/2010/inicializar-un-campo-auto_increment/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 10:05:21 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.dcastello.com/?p=9</guid>
		<description><![CDATA[Si teneis la necesidad de inicializar en mysql un campo auto_increment con un valor determinado basta con ejecutar la siguiente sentencia: ALTER TABLE curso AUTO_INCREMENT = 100 Y el primer valor para nuestros cursos será el 100.]]></description>
			<content:encoded><![CDATA[<p>Si teneis la necesidad de inicializar en mysql un campo auto_increment con un valor determinado basta con ejecutar la siguiente sentencia:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">ALTER</span> <span style="color: #993333; font-weight: bold;">TABLE</span> curso <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span> <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">100</span></pre></div></div>

<p>Y el primer valor para nuestros cursos será el 100.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dcastello.com/09/01/2010/inicializar-un-campo-auto_increment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

