<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Parameterized Queries - MySQL</title><link>http://weblogs.asp.net/cumpsd/archive/2004/04/05/107456.aspx</link><description>Today I was looking over a project I'm working on currently, more specifically, at the SQL queries in it. I come from a PHP background, where there is no such thing as parameterized queries. You simply build your own SQL string and make sure it doesn</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: Parameterized Queries - MySQL</title><link>http://weblogs.asp.net/cumpsd/archive/2004/04/05/107456.aspx#152508</link><pubDate>Thu, 10 Jun 2004 11:29:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:152508</guid><dc:creator>Erik</dc:creator><author>Erik</author><description>Thank you! Thank you! Thank you!&lt;br&gt;&lt;br&gt;Coming from SQL Server and Oracle, I was so used to using named parameters that I totally forgot the questionmark approach. This being my first MySQL project, I was about to knock my head through the wall wondering why that database wasn't accepting my update statements.. as you pointed out, inject dynamic SQL is dangerous and not done.&lt;br&gt;&lt;br&gt;Like the others I just assume that MySQL supported named parameters... doh!&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=152508" width="1" height="1"&gt;</description></item><item><title>re: Parameterized Queries - MySQL</title><link>http://weblogs.asp.net/cumpsd/archive/2004/04/05/107456.aspx#130664</link><pubDate>Wed, 12 May 2004 19:13:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:130664</guid><dc:creator>anonymous thanks</dc:creator><author>anonymous thanks</author><description>Thank you so much for posting this (and thank the lord for google for helping me find this post). I was banging my head against the wall with this same issue and being new to MySql I hadn't realized it didn't support paramertized queries. Thanks!&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=130664" width="1" height="1"&gt;</description></item><item><title>re: Parameterized Queries - MySQL</title><link>http://weblogs.asp.net/cumpsd/archive/2004/04/05/107456.aspx#130465</link><pubDate>Wed, 12 May 2004 14:07:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:130465</guid><dc:creator>Peter Lindeman</dc:creator><author>Peter Lindeman</author><description>Thanks Chris, I will have to give it a shot. Not sure I am going to be able to figure out how to get it to work, but I will try.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=130465" width="1" height="1"&gt;</description></item><item><title>re: Parameterized Queries - MySQL</title><link>http://weblogs.asp.net/cumpsd/archive/2004/04/05/107456.aspx#128799</link><pubDate>Sun, 09 May 2004 21:03:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:128799</guid><dc:creator>Chris Turchin</dc:creator><author>Chris Turchin</author><description>I think Carlos G.A's managed firebird provider for .NET supports named parameters with the  @-prefix, e.g. &amp;quot;select * from tbl_Name where id = @id&amp;quot; All the info is available here: &lt;a target="_new" href="http://www.go-mono.com/firebird.html"&gt;http://www.go-mono.com/firebird.html&lt;/a&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=128799" width="1" height="1"&gt;</description></item><item><title>re: Parameterized Queries - MySQL</title><link>http://weblogs.asp.net/cumpsd/archive/2004/04/05/107456.aspx#126773</link><pubDate>Wed, 05 May 2004 23:18:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:126773</guid><dc:creator>Peter Lindeman</dc:creator><author>Peter Lindeman</author><description>I am having the same problems with interbase/firbird. I tried the ? marks and that did work. Does anyone know of a similar library for interbase/firebird so I can use named parameters? Thanks&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=126773" width="1" height="1"&gt;</description></item><item><title>re: Parameterized Queries - MySQL</title><link>http://weblogs.asp.net/cumpsd/archive/2004/04/05/107456.aspx#111118</link><pubDate>Sun, 11 Apr 2004 07:42:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:111118</guid><dc:creator>heh</dc:creator><author>heh</author><description>yes, it's really stupid mistake :)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=111118" width="1" height="1"&gt;</description></item><item><title>re: Parameterized Queries - MySQL</title><link>http://weblogs.asp.net/cumpsd/archive/2004/04/05/107456.aspx#108421</link><pubDate>Tue, 06 Apr 2004 14:48:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:108421</guid><dc:creator>drazic19</dc:creator><author>drazic19</author><description>glad to know my asp.net thread was of use to someone else as well as me.&lt;br&gt;&lt;br&gt;drazic19&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=108421" width="1" height="1"&gt;</description></item><item><title>re: Parameterized Queries - MySQL</title><link>http://weblogs.asp.net/cumpsd/archive/2004/04/05/107456.aspx#107621</link><pubDate>Mon, 05 Apr 2004 09:25:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:107621</guid><dc:creator>David Cumps</dc:creator><author>David Cumps</author><description>Good alternative, I thought of using it as well, but it will be in the next project :)&lt;br&gt;&lt;br&gt;For others wanting it:&lt;br&gt;&lt;a target="_new" href="http://www.mysql.com/downloads/api-dotnet.html"&gt;http://www.mysql.com/downloads/api-dotnet.html&lt;/a&gt;&lt;br&gt;MySQLDriverCS &amp;amp; ByteFX.Data&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=107621" width="1" height="1"&gt;</description></item><item><title>re: Parameterized Queries - MySQL</title><link>http://weblogs.asp.net/cumpsd/archive/2004/04/05/107456.aspx#107487</link><pubDate>Mon, 05 Apr 2004 03:07:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:107487</guid><dc:creator>Ryan Gregg</dc:creator><author>Ryan Gregg</author><description>You should look into using the ByteFX MySQL library.  It's a native MySQL interface for .NET, so you don't have to use ODBC or ODBC drivers.  It also supports name parameters, which could certainly make the code easier to understand and update.&lt;br&gt;&lt;br&gt;Just a thought!  I've been using the library for a project I've been working on, and it's worked great.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=107487" width="1" height="1"&gt;</description></item><item><title>re: Parameterized Queries - MySQL</title><link>http://weblogs.asp.net/cumpsd/archive/2004/04/05/107456.aspx#107458</link><pubDate>Sun, 04 Apr 2004 23:38:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:107458</guid><dc:creator>Bertg</dc:creator><author>Bertg</author><description>noted into memory :p&lt;br&gt;&lt;br&gt;small bug are hard to find :p&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=107458" width="1" height="1"&gt;</description></item></channel></rss>