<?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>Hotfirenet &#187; MySql</title>
	<atom:link href="http://www.hotfirenet.com/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hotfirenet.com</link>
	<description>L&#039;espace web d&#039;un passionné</description>
	<lastBuildDate>Wed, 16 May 2012 11:19:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>NPDS &#8211; Meta Mot X Derniers commentaires</title>
		<link>http://www.hotfirenet.com/npds-meta-mot-x-derniers-commentaires</link>
		<comments>http://www.hotfirenet.com/npds-meta-mot-x-derniers-commentaires#comments</comments>
		<pubDate>Wed, 25 Jan 2012 09:04:13 +0000</pubDate>
		<dc:creator>Djo</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Méta mot]]></category>
		<category><![CDATA[MySql]]></category>
		<category><![CDATA[Npds]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.hotfirenet.com/?p=85</guid>
		<description><![CDATA[ketzol a demandé il y a quelques jours sur le forum de NPDS, si il existait une fonction, ou autre permettant d’afficher les X Derniers Commentaires, jusqu’à présent ce n’était pas possible, mais aujourd’hui c’est chose faite.

]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.npds.org/powerpack.php?op=instant_message&#038;to_userid=ketzol" title="ketzol" target="blank">ketzol</a> a demandé il y a quelques jours sur le forum de NPDS, si il existait une fonction permettant d’afficher les X Derniers Commentaires, jusqu’à présent ce n’était pas possible mais aujourd’hui c’est chose faite.</p>
<p>Pour installer ce méta-mot vous avez deux possibilités :</p>
<p>L’installer manuellement en suivant cette méthode, Installation et Gestion des Méta-Mot,<br />
avec le fichier d’installation automatique qui se trouve par ici X derniers commentaires</p>
<pre class="brush: php; title: ; notranslate">
function MM_dernierCommentaires($nbCommentaire = 10, $maLimite = 80) {
	global $NPDS_Prefix;

	$nbCommentaire = arg_filter($nbCommentaire);
	$maLimite = arg_filter($maLimite);

	$sqlSelect = 'SELECT '.$NPDS_Prefix.'posts.topic_id, '.$NPDS_Prefix.'posts.poster_id, '.$NPDS_Prefix.'posts.post_text, '.$NPDS_Prefix.'users.name, '.$NPDS_Prefix.'stories.title
					FROM '.$NPDS_Prefix.'posts
						INNER JOIN '.$NPDS_Prefix.'users ON '.$NPDS_Prefix.'posts.poster_id = '.$NPDS_Prefix.'users.uid
						INNER JOIN '.$NPDS_Prefix.'stories ON '.$NPDS_Prefix.'posts.topic_id = '.$NPDS_Prefix.'stories.sid
						WHERE forum_id = -1
							ORDER BY post_id DESC
							LIMIT '.$nbCommentaire;
	$execSqlSelect = sql_query($sqlSelect);
	$content .= '&lt;ul id=&quot;dernierCommentaire&quot;&gt;';

	while($dernierCommentaires = sql_fetch_row($execSqlSelect)) {
		$dernierComment = strip_tags($dernierCommentaires[2]);
		if(strlen($dernierComment) &amp;amp;gt;= $maLimite) {
			while($dernierComment[$maLimite - 1] != &quot; &quot;) {
				$maLimite++;
			}
			$dernierComment = substr($dernierComment, 0, $maLimite);
			$dernierComment .= ' ...';
		}
		$remplaceNPDS = str_replace('NPDS', 'npds', $dernierCommentaires[4]);
		$content .= $dernierCommentaires[1] == 1 ? '&lt;li&gt;Anonyme : &lt;a title=&quot;'.$remplaceNPDS.'&quot; href=&quot;article.php?sid='.$dernierCommentaires[0].'&quot;&gt;'.$dernierComment.'&lt;/a&gt;&lt;/li&gt;'  :  '&lt;li&gt;&lt;a href=&quot;user.php?op=userinfo&amp;amp;amp;uname='.$dernierCommentaires[3].'&quot;&gt;'.$dernierCommentaires[3].'&lt;/a&gt; : &lt;a title=&quot;'.$remplaceNPDS.'&quot; href=&quot;article.php?sid='.$dernierCommentaires[0].'&quot;&gt;'.$dernierComment.'&lt;/a&gt;&lt;/li&gt;';
	}
	$content .= '&lt;/ul&gt;';
	return($content);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.hotfirenet.com/npds-meta-mot-x-derniers-commentaires/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL &#8211; Injection SQL ok mais comment l’éviter avec MS SQL avec PHP?</title>
		<link>http://www.hotfirenet.com/sql-injection-sql-ok-mais-comment-l%e2%80%99eviter-avec-ms-sql-avec-php</link>
		<comments>http://www.hotfirenet.com/sql-injection-sql-ok-mais-comment-l%e2%80%99eviter-avec-ms-sql-avec-php#comments</comments>
		<pubDate>Wed, 03 Sep 2008 12:54:31 +0000</pubDate>
		<dc:creator>Djo</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[MsSQL]]></category>
		<category><![CDATA[MySql]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.hotfirenet.com/?p=107</guid>
		<description><![CDATA[Sous MySQL il existe la fonction mysql_escape_string ou encore mysql_real_escape_string, mais sous MS SQL avec PHP ces fonctions n’existent pas. Voici une fonction équivalente a mysql_escape_string , mais l’une comme l’autre elles ne protègent pas les caractères % et _.]]></description>
			<content:encoded><![CDATA[<p>Sous MySQL il existe la fonction mysql_escape_string ou encore mysql_real_escape_string, mais sous MS SQL avec PHP ces fonctions n’existent pas.</p>
<p>Voici une fonction équivalente a mysql_escape_string , mais l’une comme l’autre elles ne protègent pas les caractères % et _.</p>
<pre class="brush: php; title: ; notranslate">
function mssql_escape_string($str) {
    $str = str_replace(&quot;'&quot;,&quot;''&quot;,$str);
    $str = htmlspecialchars($str, ENT_QUOTES);
    return $str;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.hotfirenet.com/sql-injection-sql-ok-mais-comment-l%e2%80%99eviter-avec-ms-sql-avec-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

