<?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>iTx Technologies</title>
	<atom:link href="http://itx-technologies.com/feed" rel="self" type="application/rss+xml" />
	<link>http://itx-technologies.com</link>
	<description>Programmation et intégration Web à Montréal</description>
	<lastBuildDate>Tue, 21 Feb 2012 02:25:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Créer une pagination sous WordPress</title>
		<link>http://itx-technologies.com/blog/3345-creer-une-pagination-sous-wordpress</link>
		<comments>http://itx-technologies.com/blog/3345-creer-une-pagination-sous-wordpress#comments</comments>
		<pubDate>Fri, 17 Feb 2012 13:51:41 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[thème]]></category>
		<category><![CDATA[trucs et astuces]]></category>

		<guid isPermaLink="false">http://itx-technologies.com/?p=3345</guid>
		<description><![CDATA[Rien de plus simple que ça ! Toutefois, il existe encore plusieurs plugins qui font la même chose même si WordPress possède une fonction juste pour ça : &#60;?php // Tiré de codex.wordpress.org global $wp_query; &#160; $big = 999999999; // need an unlikely integer &#160; echo paginate_links&#40; array&#40; 'base' =&#62; str_replace&#40; $big, '%#%', get_pagenum_link&#40; $big [...]]]></description>
			<content:encoded><![CDATA[<p>Rien de plus simple que ça ! Toutefois, il existe encore plusieurs plugins qui font la même chose même si WordPress possède une fonction juste pour ça :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// Tiré de codex.wordpress.org</span>
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$big</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">999999999</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// need an unlikely integer</span>
&nbsp;
<span style="color: #b1b100;">echo</span> paginate_links<span style="color: #009900;">&#40;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">'base'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$big</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'%#%'</span><span style="color: #339933;">,</span> get_pagenum_link<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$big</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'format'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'?paged=%#%'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'current'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">max</span><span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> get_query_var<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'paged'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'total'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">max_num_pages</span>
<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Copiez ce code dans le fichier index.php, archives.php, search.php ou peu importe là où vous voulez avoir une pagination !</p>
]]></content:encoded>
			<wfw:commentRss>http://itx-technologies.com/blog/3345-creer-une-pagination-sous-wordpress/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Désactiver les rétroliens vers son propre site WordPress</title>
		<link>http://itx-technologies.com/blog/3282-desactiver-les-retroliens-vers-son-propre-site-wordpress</link>
		<comments>http://itx-technologies.com/blog/3282-desactiver-les-retroliens-vers-son-propre-site-wordpress#comments</comments>
		<pubDate>Fri, 10 Feb 2012 19:38:12 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[didacticiel]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[rétroliens]]></category>

		<guid isPermaLink="false">http://itx-technologies.com/?p=3282</guid>
		<description><![CDATA[Un rétrolien, c&#8217;est une façon d&#8217;envoyer un ping à un autre blogue pour lui faire signe que vous parlez du même sujet ou que vous l&#8217;avez cité dans votre article. Le ping se fait automatiquement sous WordPress : vous n&#8217;avez qu&#8217;à faire un lien vers un autre site, et celui-ci recevra un ping sous forme [...]]]></description>
			<content:encoded><![CDATA[<p>Un rétrolien, c&#8217;est une façon d&#8217;envoyer un <em>ping</em> à un autre blogue pour lui faire signe que vous parlez du même sujet ou que vous l&#8217;avez cité dans votre article.  Le ping se fait automatiquement sous WordPress : vous n&#8217;avez qu&#8217;à faire un lien vers un autre site, et celui-ci recevra un <em>ping</em> sous forme de commentaire automatisé.</p>
<p>Mais à quoi bon s&#8217;<em>auto-pinger</em> ?  Lorsque vous faites un lien vers un article de votre propre blogue, WordPress ne fait pas la distinction entre votre site ou un autre, alors il créera un commentaire sous l&#8217;article vers lequel vous avez fait un lien, comme si c&#8217;était un autre site qui venait de vous envoyer un rétrolien.</p>
<h3>Comment désactiver les <em>auto-rétroliens</em></h3>
<p>Il suffit d&#8217;écrire une fonction dans votre fichier functions.php et de <em>hooker</em> cette fonction à l&#8217;action <em>pre_ping</em> qui est exécutée juste avant que WordPress ne génère les pings.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Désactiver les rétroliens vers son propre site</span>
<span style="color: #000000; font-weight: bold;">function</span> mes_retroliens<span style="color: #009900;">&#40;</span> <span style="color: #339933;">&amp;</span><span style="color: #000088;">$liens</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$home</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'home'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$liens</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$l</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$lien</span> <span style="color: #009900;">&#41;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">0</span> <span style="color: #339933;">===</span> <span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$lien</span><span style="color: #339933;">,</span> <span style="color: #000088;">$home</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
            <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$liens</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$l</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'pre_ping'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'mes_retroliens'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>La fonction, <a href="http://wordpress.org/support/topic/feature-removal-request-self-pingbacks">écrite par un membre des forums de WordPress</a>, va <em>parser</em> le ou les liens de votre articles, et si elle découvre qu&#8217;un de ces liens possède l&#8217;URL de votre site, elle ne la comptera pas dans les rétroliens à faire.</p>
]]></content:encoded>
			<wfw:commentRss>http://itx-technologies.com/blog/3282-desactiver-les-retroliens-vers-son-propre-site-wordpress/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Afficher seulement les noms des fichiers avec la commande grep</title>
		<link>http://itx-technologies.com/blog/3276-afficher-seulement-les-noms-des-fichiers-avec-la-commande-grep</link>
		<comments>http://itx-technologies.com/blog/3276-afficher-seulement-les-noms-des-fichiers-avec-la-commande-grep#comments</comments>
		<pubDate>Thu, 09 Feb 2012 19:15:53 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[commande]]></category>
		<category><![CDATA[grep]]></category>

		<guid isPermaLink="false">http://itx-technologies.com/?p=3276</guid>
		<description><![CDATA[Je vous ai souvent parlé de la commande grep, cette commande qui m&#8217;a sauvé la vie Ô combien de fois ! Pour les non-initiés, la commande grep, exécutée dans un terminal Linux, sert à rechercher une expression donnée à l&#8217;intérieur d&#8217;un ou de plusieurs fichiers. Exemple Cela dit, lorsque vous exécutez une commande, par exemple [...]]]></description>
			<content:encoded><![CDATA[<p>Je vous ai <a href="http://itx-technologies.com/blog/1521-5-exemples-avec-la-commande-grep-sur-linux" title="5 exemples avec la commande grep sur Linux">souvent parlé</a> de la <a href="http://itx-technologies.com/man-linux/grep-egrep-fgrep-afficher-les-lignes-correspondant-a-un-motif-donne" title="grep, egrep, fgrep – Afficher les lignes correspondant à un motif donné">commande grep</a>, cette  commande qui m&#8217;a sauvé la vie Ô combien de fois !</p>
<p>Pour les non-initiés, la commande grep, exécutée dans un terminal Linux, sert à rechercher une expression donnée à l&#8217;intérieur d&#8217;un ou de plusieurs fichiers.</p>
<h3>Exemple</h3>
<p>Cela dit, lorsque vous exécutez une commande, par exemple :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-R</span> include wp-content<span style="color: #000000; font-weight: bold;">/*</span></pre></div></div>

<p>le résultat de la commande, qui cherche l&#8217;expression &laquo;&nbsp;include&nbsp;&raquo; dans tous les fichiers du dossier, et sous-dossiers, de <em>wp-content</em>, donnera quelque chose du genre :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-R</span> include wp-content<span style="color: #000000; font-weight: bold;">/*</span>
plugins<span style="color: #000000; font-weight: bold;">/</span>akismet:    <span style="color: #007800;">odeValue</span>=trimAndGetNodeText<span style="color: #7a0874; font-weight: bold;">&#40;</span>table.config,node<span style="color: #7a0874; font-weight: bold;">&#41;</span>;<span style="color: #000000; font-weight: bold;">if</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>table.config.debug<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>log<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'Checking if value was empty on row:'</span>+rowIndex<span style="color: #7a0874; font-weight: bold;">&#41;</span>;<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">else</span><span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #007800;">keepLooking</span>=<span style="color: #c20cb9; font-weight: bold;">false</span>;<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">for</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>var <span style="color: #007800;">i</span>=<span style="color: #000000;">1</span>;i<span style="color: #000000; font-weight: bold;">&lt;</span>l;i++<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #000000; font-weight: bold;">if</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>parsers<span style="color: #7a0874; font-weight: bold;">&#91;</span>i<span style="color: #7a0874; font-weight: bold;">&#93;</span>.is<span style="color: #7a0874; font-weight: bold;">&#40;</span>nodeValue,table,node<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">return</span> parsers<span style="color: #7a0874; font-weight: bold;">&#91;</span>i<span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #7a0874; font-weight: bold;">return</span> include<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">function</span> getNodeFromRowAndCellIndex<span style="color: #7a0874; font-weight: bold;">&#40;</span>rows,rowIndex,cellIndex<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">return</span> rows<span style="color: #7a0874; font-weight: bold;">&#91;</span>rowIndex<span style="color: #7a0874; font-weight: bold;">&#93;</span>.cells<span style="color: #7a0874; font-weight: bold;">&#91;</span>cellIndex<span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">function</span> trimAndGetNodeText<span style="color: #7a0874; font-weight: bold;">&#40;</span>config,node<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">return</span> $.trim<span style="color: #7a0874; font-weight: bold;">&#40;</span>getElementText<span style="color: #7a0874; font-weight: bold;">&#40;</span>config,node<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">function</span> getParserById<span style="color: #7a0874; font-weight: bold;">&#40;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>var <span style="color: #007800;">l</span>=parsers.length;<span style="color: #000000; font-weight: bold;">for</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>var <span style="color: #007800;">i</span>=<span style="color: #000000;">0</span>;i<span style="color: #000000; font-weight: bold;">&lt;</span>l;i++<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #000000; font-weight: bold;">if</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>parsers<span style="color: #7a0874; font-weight: bold;">&#91;</span>i<span style="color: #7a0874; font-weight: bold;">&#93;</span>.id.toLowerCase<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>==name.toLowe
themes<span style="color: #000000; font-weight: bold;">/</span>twentyten:   :<span style="color: #000000; font-weight: bold;">function</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>var <span style="color: #007800;">parsers</span>=<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>,<span style="color: #007800;">widgets</span>=<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>;this.include=<span style="color: #7a0874; font-weight: bold;">&#123;</span>cssHeader:<span style="color: #ff0000;">&quot;header&quot;</span>,cssAsc:<span style="color: #ff0000;">&quot;headerSortUp&quot;</span>,cssDesc:<span style="color: #ff0000;">&quot;headerSortDown&quot;</span>,cssChildRow:<span style="color: #ff0000;">&quot;expand-child&quot;</span>,sortInitialOrder:<span style="color: #ff0000;">&quot;asc&quot;</span>,sortMultiSortKey:<span style="color: #ff0000;">&quot;shiftKey&quot;</span>,sortForce:null,sortAppend:null,sortLocaleCompare:<span style="color: #c20cb9; font-weight: bold;">true</span>,textExtraction:<span style="color: #ff0000;">&quot;simple&quot;</span>,parse</pre></div></div>

<p>En fait, c&#8217;est que la commande renvoit la ligne de code, dans le fichier, où l&#8217;expression (en l&#8217;occurrence <em>include</em>) a été trouvée.  Le gros désavantage c&#8217;est que votre terminal est rempli de lignes de code et cela devient très difficile à lire lorsque vous avez des centaines de résultats à votre requête.</p>
<h3>La commande qui vous faut</h3>
<p>C&#8217;est simple : il vous suffit simplement d&#8217;ajouter l&#8217;option -l (grep -l) pour que seulement le nom du fichier sera affiché.  Dans notre exemple, cela deviendrait :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-lR</span> include wp-content<span style="color: #000000; font-weight: bold;">/*</span></pre></div></div>

<p>Ah, que c&#8217;est beau Linux !</p>
]]></content:encoded>
			<wfw:commentRss>http://itx-technologies.com/blog/3276-afficher-seulement-les-noms-des-fichiers-avec-la-commande-grep/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Faire un JOIN deux fois sur la même table avec MySQL</title>
		<link>http://itx-technologies.com/blog/3269-faire-un-join-deux-fois-sur-la-meme-table-avec-mysql</link>
		<comments>http://itx-technologies.com/blog/3269-faire-un-join-deux-fois-sur-la-meme-table-avec-mysql#comments</comments>
		<pubDate>Wed, 08 Feb 2012 20:24:38 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[commande]]></category>
		<category><![CDATA[JOIN]]></category>

		<guid isPermaLink="false">http://itx-technologies.com/?p=3269</guid>
		<description><![CDATA[Bon, je sais, ça peut sembler très pointu comme tuto mais c&#8217;est que nous nous faisons un devoir de publier sur des sujets qui nous ont fait galérer alors voici pourquoi. Pour ceux qui tomberont sur ce petit didactiel très simple savent très bien ce dont je parle : nous pouvons faire un JOIN avec une table [...]]]></description>
			<content:encoded><![CDATA[<p>Bon, je sais, ça peut sembler très pointu comme tuto mais c&#8217;est que nous nous faisons un devoir de publier sur des sujets qui nous ont fait galérer alors voici pourquoi.</p>
<p>Pour ceux qui tomberont sur ce petit didactiel très simple savent très bien ce dont je parle : nous pouvons faire un JOIN avec une table mais nous ne pouvons pas le faire 2 fois avec la même table !</p>
<p>Pour ce faire, il faut utiliser des synonymes :</p>
<h3>Exemple</h3>
<p>Prenons la table &laquo;&nbsp;articles&nbsp;&raquo; avec les champs id, titre, cree_par_id, modifie_par_id.  Nous voulons créer une requête en la joignant avec la table &laquo;&nbsp;utilisateurs&nbsp;&raquo; qui possède les champs id, nom. Nous voulons avoir :</p>
<p>titre de l&#8217;article, créer par (nom), modifié par (nom)</p>
<p>Les champs cree_par_id et modifier_par_id comprennent les ID des utilisateurs mais nous voulons leur nom alors il faudra faire 2 fois le JOIN :</p>
<p>JOIN #1 : articles.cree_par_id et utilisateurs.id<br />
JOIN #2 : articles.modifie_par_id et utilisateurs.id</p>
<h3>La requête</h3>
<p>Alors, ce qu&#8217;il faut faire, c&#8217;est donner un synonyme à la table &laquo;&nbsp;articles&nbsp;&raquo; car autrement, l&#8217;engin MySQL ne nous laissera pas faire 2 JOIN.</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> a1<span style="color: #66cc66;">.</span>titre<span style="color: #66cc66;">,</span> a1<span style="color: #66cc66;">.</span>cree_par_id<span style="color: #66cc66;">,</span> a2<span style="color: #66cc66;">.</span>modifie_par_id
&nbsp;
<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> articles a1 
    <span style="color: #993333; font-weight: bold;">ON</span> utilisateur<span style="color: #66cc66;">.</span><span style="color: #ff0000;">`id`</span> <span style="color: #66cc66;">=</span> a1<span style="color: #66cc66;">.</span><span style="color: #ff0000;">`cree_par_id`</span>
<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> articles a2 
    <span style="color: #993333; font-weight: bold;">ON</span> utilisateur<span style="color: #66cc66;">.</span><span style="color: #ff0000;">`id`</span> <span style="color: #66cc66;">=</span> a2<span style="color: #66cc66;">.</span><span style="color: #ff0000;">`modifie_par_id`</span></pre></div></div>

<p>Voilà, comme on peut voir, nous créons deux JOIN : la première fois avec la table a1 (premier synonyme de &laquo;&nbsp;articles&nbsp;&raquo;) et ensuite avec a2 (deuxième synonyme de &laquo;&nbsp;articles&nbsp;&raquo;).</p>
]]></content:encoded>
			<wfw:commentRss>http://itx-technologies.com/blog/3269-faire-un-join-deux-fois-sur-la-meme-table-avec-mysql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Faire une sauvegarde incrémentale de dossiers</title>
		<link>http://itx-technologies.com/blog/3261-faire-une-sauvegarde-incremental-de-dossiers</link>
		<comments>http://itx-technologies.com/blog/3261-faire-une-sauvegarde-incremental-de-dossiers#comments</comments>
		<pubDate>Thu, 26 Jan 2012 15:40:18 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[commande]]></category>
		<category><![CDATA[CRON]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[truc]]></category>

		<guid isPermaLink="false">http://itx-technologies.com/?p=3261</guid>
		<description><![CDATA[Il existe plusieurs logiciels de sauvegarde pour vos fichiers/dossiers alors que vraiment, il ne suffit que d&#8217;une petite commande de rien du tout pour le faire ! En utilisant la commande rsync, vous pouvez faire des sauvegardes incrémentales, ce qui signifie que seulement les nouveaux fichiers, ainsi que ceux qui ont été modifiés depuis la [...]]]></description>
			<content:encoded><![CDATA[<p>Il existe plusieurs logiciels de sauvegarde pour vos fichiers/dossiers alors que vraiment, il ne suffit que d&#8217;une petite commande de rien du tout pour le faire !</p>
<p>En utilisant la commande <a href="http://itx-technologies.com/man-linux/rsync-une-alternative-rapide-et-flexible-a-rcp" title="rsync – Une alternative rapide et flexible à rcp">rsync</a>, vous pouvez faire des sauvegardes incrémentales, ce qui signifie que seulement les nouveaux fichiers, ainsi que ceux qui ont été modifiés depuis la dernière sauvegarde, seront transférés.  Cela réduit le temps de transfert et l&#8217;espace disque utilisé considérablement.</p>
<h3>Sauvegarde dans un dossier local</h3>
<p>Utilisez la commande suivante pour une sauvegarde dans un dossier local de votre ordinateur :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rsync <span style="color: #660033;">-az</span> <span style="color: #660033;">--progress</span> <span style="color: #660033;">--size-only</span> <span style="color: #660033;">-o</span> <span style="color: #000000; font-weight: bold;">/</span>dossier<span style="color: #000000; font-weight: bold;">/</span>a<span style="color: #000000; font-weight: bold;">/</span>sauvegarder<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #000000; font-weight: bold;">/</span>dossier<span style="color: #000000; font-weight: bold;">/</span>de<span style="color: #000000; font-weight: bold;">/</span>destination
&nbsp;
<span style="color: #666666; font-style: italic;">#exemple</span>
rsync <span style="color: #660033;">-az</span> <span style="color: #660033;">--progress</span> <span style="color: #660033;">--size-only</span> <span style="color: #660033;">-o</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>alex<span style="color: #000000; font-weight: bold;">/</span>documents<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>alex<span style="color: #000000; font-weight: bold;">/</span>backup</pre></div></div>

<h3>Sauvegarde sur un FTP (avec SSH)</h3>
<p>Vous pouvez aussi transférer les fichiers directement sur un serveur FTP qui accepte une connexion SSH (port 22) :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rsync <span style="color: #660033;">-az</span> <span style="color: #660033;">--progress</span> <span style="color: #660033;">--size-only</span> <span style="color: #660033;">-o</span> <span style="color: #000000; font-weight: bold;">/</span>dossier<span style="color: #000000; font-weight: bold;">/</span>a<span style="color: #000000; font-weight: bold;">/</span>sauvegarder<span style="color: #000000; font-weight: bold;">/*</span> utilisateur<span style="color: #000000; font-weight: bold;">@</span>exemple.com:<span style="color: #000000; font-weight: bold;">/</span>dossier<span style="color: #000000; font-weight: bold;">/</span>sur<span style="color: #000000; font-weight: bold;">/</span>le<span style="color: #000000; font-weight: bold;">/</span>serveur
&nbsp;
<span style="color: #666666; font-style: italic;">#exemple</span>
rsync <span style="color: #660033;">-az</span> <span style="color: #660033;">--progress</span> <span style="color: #660033;">--size-only</span> <span style="color: #660033;">-o</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>alex<span style="color: #000000; font-weight: bold;">/</span>documents<span style="color: #000000; font-weight: bold;">/*</span> alex<span style="color: #000000; font-weight: bold;">@</span>itx-technologies.com:<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>alex<span style="color: #000000; font-weight: bold;">/</span>backup</pre></div></div>

<p>Pour finir, vous pourriez aussi <a href="http://itx-technologies.com/man-linux/crontab-editer-son-fichier-crontab-personnel" title="crontab – Éditer son fichier crontab personnel">programmer une tâche CRON</a> afin que la sauvegarde soit <a href="http://itx-technologies.com/blog/2259-executer-un-script-recurrent-avec-cron-exemples-sous-linux" title="Exécuter un script avec cron sous Linux">automatisée toutes les 15 minutes</a> !</p>
]]></content:encoded>
			<wfw:commentRss>http://itx-technologies.com/blog/3261-faire-une-sauvegarde-incremental-de-dossiers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

