<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Protecting Your PHP/MySQL Queries from SQL Injection</title>
	<link>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html</link>
	<description>Knowledge to help you build good websites</description>
	<pubDate>Thu, 28 Aug 2008 08:06:37 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3</generator>
		<item>
		<title>By: Adam</title>
		<link>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-202</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Fri, 04 Jan 2008 20:43:48 +0000</pubDate>
		<guid>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-202</guid>
		<description>Nice Java example, rohitj.</description>
		<content:encoded><![CDATA[<p>Nice Java example, rohitj.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FluidMarkup Blog</title>
		<link>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-169</link>
		<dc:creator>FluidMarkup Blog</dc:creator>
		<pubDate>Tue, 13 Nov 2007 19:07:57 +0000</pubDate>
		<guid>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-169</guid>
		<description>[...] Protecting your Queries from SQL Injection [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Protecting your Queries from SQL Injection [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-158</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Sat, 10 Nov 2007 21:08:21 +0000</pubDate>
		<guid>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-158</guid>
		<description>If you liked this article then I'd highly recommend taking it further with this article: http://www.talkphp.com/showthread.php?t=1062</description>
		<content:encoded><![CDATA[<p>If you liked this article then I&#8217;d highly recommend taking it further with this article: <a href="http://www.talkphp.com/showthread.php?t=1062" rel="nofollow">http://www.talkphp.com/showthread.php?t=1062</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jokes</title>
		<link>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-140</link>
		<dc:creator>Jokes</dc:creator>
		<pubDate>Mon, 05 Nov 2007 23:52:02 +0000</pubDate>
		<guid>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-140</guid>
		<description>1. Check data validity. e.g. if it's numeric or it matches some regular expression.
2. Strip off special characters
3. Use database security settings (separate read only from others even for the same user) 


The other option is to use databases that allow you to have stored procedures and ovoid SQL injection.</description>
		<content:encoded><![CDATA[<p>1. Check data validity. e.g. if it&#8217;s numeric or it matches some regular expression.<br />
2. Strip off special characters<br />
3. Use database security settings (separate read only from others even for the same user) </p>
<p>The other option is to use databases that allow you to have stored procedures and ovoid SQL injection.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: My Hobby is Programming &#187; Blog Archive &#187; Protecting Your PHP/MySQL Applications from SQL Injection</title>
		<link>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-107</link>
		<dc:creator>My Hobby is Programming &#187; Blog Archive &#187; Protecting Your PHP/MySQL Applications from SQL Injection</dc:creator>
		<pubDate>Sat, 27 Oct 2007 10:30:27 +0000</pubDate>
		<guid>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-107</guid>
		<description>[...] read more &#124; digg story [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] read more | digg story [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BlogBuzz October 27, 2007 &#187; Webmaster-Source</title>
		<link>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-106</link>
		<dc:creator>BlogBuzz October 27, 2007 &#187; Webmaster-Source</dc:creator>
		<pubDate>Sat, 27 Oct 2007 10:03:32 +0000</pubDate>
		<guid>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-106</guid>
		<description>[...] Protecting Your PHP/MySQL Queries from SQL Injection [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Protecting Your PHP/MySQL Queries from SQL Injection [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Devlounge &#124; Friday Focus #51</title>
		<link>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-102</link>
		<dc:creator>Devlounge &#124; Friday Focus #51</dc:creator>
		<pubDate>Fri, 26 Oct 2007 04:01:52 +0000</pubDate>
		<guid>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-102</guid>
		<description>[...] - Protecting Your PHP/MySQL Applications from SQL Injection From the Digg description: SQL injection is a serious concern for webmasters, as an experienced [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] - Protecting Your PHP/MySQL Applications from SQL Injection From the Digg description: SQL injection is a serious concern for webmasters, as an experienced [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rohitj</title>
		<link>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-97</link>
		<dc:creator>rohitj</dc:creator>
		<pubDate>Wed, 24 Oct 2007 18:29:52 +0000</pubDate>
		<guid>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-97</guid>
		<description>In java as well, the syntaxes are pretty much similar :
				PreparedStatement s;
s = conn.prepareStatement( "INSERT INTO" + " "
                        + calendarTable + " "
                        + "(serverCalendarID, 
                        serverAPI, 
                        calendarName)"
						
                        + " VALUES"
                        + "(?, ?, ?)" );
s.setString (1, newCalendar.serverCalendarID);
s.setString (2, newCalendar.serverAPI);
s.setString (3, newCalendar.calendarName);
s.executeUpdate ();</description>
		<content:encoded><![CDATA[<p>In java as well, the syntaxes are pretty much similar :<br />
				PreparedStatement s;<br />
s = conn.prepareStatement( &#8220;INSERT INTO&#8221; + &#8221; &#8221;<br />
                        + calendarTable + &#8221; &#8221;<br />
                        + &#8220;(serverCalendarID,<br />
                        serverAPI,<br />
                        calendarName)&#8221;</p>
<p>                        + &#8221; VALUES&#8221;<br />
                        + &#8220;(?, ?, ?)&#8221; );<br />
s.setString (1, newCalendar.serverCalendarID);<br />
s.setString (2, newCalendar.serverAPI);<br />
s.setString (3, newCalendar.calendarName);<br />
s.executeUpdate ();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Errante</title>
		<link>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-93</link>
		<dc:creator>Daniel Errante</dc:creator>
		<pubDate>Wed, 24 Oct 2007 14:06:44 +0000</pubDate>
		<guid>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-93</guid>
		<description>I believe web developers should know about these security threats before programming websites. Once you know about the threats and how to stop them, you should look into a framework such as CodeIgniter which has most of these basic measures built into the core, so you can worry about more important things such as finishing your website!</description>
		<content:encoded><![CDATA[<p>I believe web developers should know about these security threats before programming websites. Once you know about the threats and how to stop them, you should look into a framework such as CodeIgniter which has most of these basic measures built into the core, so you can worry about more important things such as finishing your website!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boiss</title>
		<link>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-63</link>
		<dc:creator>Boiss</dc:creator>
		<pubDate>Mon, 22 Oct 2007 20:57:34 +0000</pubDate>
		<guid>http://www.metatitan.com/php/16/protecting-your-phpmysql-queries-from-sql-injection.html#comment-63</guid>
		<description>Useful functions...

function mstr($value) {
	if (get_magic_quotes_gpc()) $value = stripslashes($value);
	return mysql_real_escape_string($value);
}

function num($val) {
	if (!is_numeric($val)) return 0;
	return $val;
}</description>
		<content:encoded><![CDATA[<p>Useful functions&#8230;</p>
<p>function mstr($value) {<br />
	if (get_magic_quotes_gpc()) $value = stripslashes($value);<br />
	return mysql_real_escape_string($value);<br />
}</p>
<p>function num($val) {<br />
	if (!is_numeric($val)) return 0;<br />
	return $val;<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
