<?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>Webmaster Sucks &#187; MySQL</title>
	<atom:link href="http://www.webmastersucks.com/cats/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webmastersucks.com</link>
	<description>Here I share stuff I used to suck at as a novice webmaster..</description>
	<lastBuildDate>Tue, 11 May 2010 10:56:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Grouping Date with Datetime in MySQL</title>
		<link>http://www.webmastersucks.com/grouping-date-with-datetime-in-mysql/</link>
		<comments>http://www.webmastersucks.com/grouping-date-with-datetime-in-mysql/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 11:17:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[date calculation]]></category>
		<category><![CDATA[datetime]]></category>
		<category><![CDATA[date_format]]></category>
		<category><![CDATA[grouping date]]></category>
		<category><![CDATA[grouping date datetime]]></category>
		<category><![CDATA[grouping date mysql]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=261</guid>
		<description><![CDATA[
			
				
			
		
This is very basic and very useful command for mysql. I need user registration date by date. Firstly, i calculate with PHP, after i think it must be a basic way. I found this mysql command. I hope you&#8217;ll enjoy.

SELECT DATE_FORMAT(registerdate, '%Y-%m-%d') AS dd, COUNT(id) as TotalUser FROM UserTable GROUP BY dd;

]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fgrouping-date-with-datetime-in-mysql%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fgrouping-date-with-datetime-in-mysql%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>This is very basic and very useful command for mysql. I need user registration date by date. Firstly, i calculate with PHP, after i think it must be a basic way. I found this mysql command. I hope you&#8217;ll enjoy.</p>
<pre class="brush: php;">
SELECT DATE_FORMAT(registerdate, '%Y-%m-%d') AS dd, COUNT(id) as TotalUser FROM UserTable GROUP BY dd;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/grouping-date-with-datetime-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unique Email Address in Mysql</title>
		<link>http://www.webmastersucks.com/unique-email-address-in-mysql/</link>
		<comments>http://www.webmastersucks.com/unique-email-address-in-mysql/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 12:59:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[dublicate email]]></category>
		<category><![CDATA[dublicate email mysql]]></category>
		<category><![CDATA[email mysql]]></category>
		<category><![CDATA[unique email]]></category>
		<category><![CDATA[unique email mysql]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=256</guid>
		<description><![CDATA[
			
				
			
		
I have a big mail database but there are some dublicate email addresses. I need unique email address lists and i follow this way;
Firstly i create temporary table for unique email address
CREATE  TABLE  mail_temp (  `email` varchar( 255  )  NOT  NULL default  ''

) ENGINE  =  MyISAM;

After i add unique email address to that temp table
INSERT [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Funique-email-address-in-mysql%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Funique-email-address-in-mysql%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I have a big mail database but there are some dublicate email addresses. I need unique email address lists and i follow this way;</p>
<p><strong>Firstly i create temporary table for unique email address</strong></p>
<pre class="brush: plain;">CREATE  TABLE  mail_temp (  `email` varchar( 255  )  NOT  NULL default  ''

) ENGINE  =  MyISAM;
</pre>
<p><strong>After i add unique email address to that temp table</strong></p>
<pre class="brush: plain;">INSERT INTO mail_temp SELECT DISTINCT(email) FROM mail_table</pre>
<p><strong>I dropped my real email table</strong></p>
<pre class="brush: plain;">DROP TABLE mail_table;</pre>
<p><strong>After all, i create new mail table and moved the temporary mail table to in.</strong></p>
<pre class="brush: plain;">
CREATE TABLE mail_table( `email` varchar( 255 ) NOT NULL default ''
) ENGINE  = MyISAM;

INSERT INTO mail_table SELECT  DISTINCT(email) FROM mail_temp;

DROP TABLE mail_temp;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/unique-email-address-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Select Users Age in MySQL</title>
		<link>http://www.webmastersucks.com/select-users-age-in-mysql/</link>
		<comments>http://www.webmastersucks.com/select-users-age-in-mysql/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 13:55:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[age group]]></category>
		<category><![CDATA[birthday mysql]]></category>
		<category><![CDATA[group by]]></category>
		<category><![CDATA[group by year]]></category>
		<category><![CDATA[group year]]></category>
		<category><![CDATA[group year mysql]]></category>
		<category><![CDATA[grouping years in mysql]]></category>
		<category><![CDATA[select birthday mysql]]></category>
		<category><![CDATA[select users]]></category>
		<category><![CDATA[select year]]></category>
		<category><![CDATA[select year mysql]]></category>
		<category><![CDATA[sql year]]></category>
		<category><![CDATA[year mysql]]></category>
		<category><![CDATA[year select mysql]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=253</guid>
		<description><![CDATA[
			
				
			
		
SELECT count(id) AS toplam,YEAR(tarih_dogum) AS YIL FROM uyeler GROUP BY YEAR(tarih_dogum)
Advertising agencies wants to user profile for advertisements. I need my users age. I found a little solution. I write this SQL statement for select which year my users born and group them.

SELECT count(id) AS total,YEAR(birthday) AS birth_year FROM users GROUP BY YEAR(birthday);

After i copied [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fselect-users-age-in-mysql%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fselect-users-age-in-mysql%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">SELECT count(id) AS toplam,YEAR(tarih_dogum) AS YIL FROM uyeler GROUP BY YEAR(tarih_dogum)</div>
<p>Advertising agencies wants to user profile for advertisements. I need my users age. I found a little solution. I write this SQL statement for select which year my users born and group them.</p>
<pre class="brush: plain;">
SELECT count(id) AS total,YEAR(birthday) AS birth_year FROM users GROUP BY YEAR(birthday);
</pre>
<div>After i copied this results to Excel. I calculate age groups like &#8220;18-24 years old&#8221; in Excel and send my offer to agencies.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/select-users-age-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Php 5.2.9 Updated But Mysql Doesnt Work</title>
		<link>http://www.webmastersucks.com/php-5-2-9-updated-but-mysql-doesnt-work/</link>
		<comments>http://www.webmastersucks.com/php-5-2-9-updated-but-mysql-doesnt-work/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 18:54:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[enablerepo]]></category>
		<category><![CDATA[mysql error]]></category>
		<category><![CDATA[mysql install]]></category>
		<category><![CDATA[mysql upgrade]]></category>
		<category><![CDATA[php 5.2.9]]></category>
		<category><![CDATA[php error]]></category>
		<category><![CDATA[php install]]></category>
		<category><![CDATA[php modules]]></category>
		<category><![CDATA[php upgrade]]></category>
		<category><![CDATA[php-mysql upgrade]]></category>
		<category><![CDATA[remi]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=151</guid>
		<description><![CDATA[
			
				
			
		
I blogged Php 5.2.9 Upgrade. Some of my user updated with using this entry. But i miss something in these entry. Firstly, i have to say. If you upgrade php version, you have to upgrade mysql and php-mysql.
To Upgrade Mysql and Php-Mysql tool


yum --enablerepo=remi update mysql*
yum --enablerepo=remi update php-mysql

And there one more thing, he was [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fphp-5-2-9-updated-but-mysql-doesnt-work%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fphp-5-2-9-updated-but-mysql-doesnt-work%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I blogged <a href="/update-php-to-529-in-centos/" target="_blank">Php 5.2.9 Upgrade</a>. Some of my user updated with using this entry. But i miss something in these entry. Firstly, i have to say. If you upgrade php version, you have to upgrade mysql and php-mysql.</p>
<p><strong>To Upgrade Mysql and Php-Mysql tool<br />
</strong>
<pre class="brush: plain;">
yum --enablerepo=remi update mysql*
yum --enablerepo=remi update php-mysql
</pre>
<p>And there one more thing, he was php4 and upgrade to 5. Firstly we can not upgrade, we install php newly.</p>
<p><strong>Installing Php</strong></p>
<pre class="brush: plain;">yum --enablerepo=remi install php</pre>
<p>When you install on old version, there will be somethings to change.  Their extentions directory are different<br />
<strong>Old One<br />
</strong>extension_dir = /usr/lib/php4</p>
<p><strong>New one (Php 5)<br />
</strong>extension_dir = /usr/lib/php/modules</p>
<p><strong>And i restarted services</strong></p>
<pre class="brush: plain;">/etc/init.d/mysqld restart
/etc/init.d/httpd restart</pre>
<p>I get error in httpd restart</p>
<blockquote><p>PHP Warning:  Module &#8216;mysql&#8217; already loaded in Unknown on line 0<br />
PHP Warning:  Module &#8216;mysqli&#8217; already loaded in Unknown on line 0</p></blockquote>
<p>Because mysql is standart module in php5, we dont need load mysql in config file. I change php.ini file (/etc/php.ini) Only i add ; character, it is for comments.</p>
<pre class="brush: plain;">;extension=mysql.so
;extension=mysqli.so</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/php-5-2-9-updated-but-mysql-doesnt-work/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating Google Sitemap in PHP</title>
		<link>http://www.webmastersucks.com/creating-google-sitemap-in-php/</link>
		<comments>http://www.webmastersucks.com/creating-google-sitemap-in-php/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 11:09:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[google sitemap]]></category>
		<category><![CDATA[sitemap php]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=78</guid>
		<description><![CDATA[
			
				
			
		
We can create dynamic sitemap with using PHP &#38; Mysql. My example code is easy to apply your system.

&#60;?PHP
header('content-type: text/xml');

$mysql_username = &#34;&#34;;
$mysql_password = &#34;&#34;;
$mysql_database = &#34;&#34;;

$dblink = mysql_connect(&#34;localhost&#34;, &#34;$mysql_username&#34;, &#34;$mysql_password&#34;);
if (!$dblink) {
die('ERROR: Can not connect database' . mysql_error());
}
@mysql_select_db(&#34;$mysql_database&#34;) or die (&#34;ERROR: Cannot select database&#34;);

echo('&#60;'.'?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;'.'?'.'&#62;');
echo('&#60;urlset xmlns=&#34;http://www.google.com/schemas/sitemap/0.84&#34;&#62;');

$contentQ = mysql_query(&#34;SELECT * FROM content_table&#34;);
while($contentR = mysql_fetch_array($contentQ))
{
$url = [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fcreating-google-sitemap-in-php%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fcreating-google-sitemap-in-php%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>We can create dynamic sitemap with using PHP &amp; Mysql. My example code is easy to apply your system.</p>
<pre class="brush: php;">
&lt;?PHP
header('content-type: text/xml');

$mysql_username = &quot;&quot;;
$mysql_password = &quot;&quot;;
$mysql_database = &quot;&quot;;

$dblink = mysql_connect(&quot;localhost&quot;, &quot;$mysql_username&quot;, &quot;$mysql_password&quot;);
if (!$dblink) {
die('ERROR: Can not connect database' . mysql_error());
}
@mysql_select_db(&quot;$mysql_database&quot;) or die (&quot;ERROR: Cannot select database&quot;);

echo('&lt;'.'?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;'.'?'.'&gt;');
echo('&lt;urlset xmlns=&quot;http://www.google.com/schemas/sitemap/0.84&quot;&gt;');

$contentQ = mysql_query(&quot;SELECT * FROM content_table&quot;);
while($contentR = mysql_fetch_array($contentQ))
{
$url = $contentR[&quot;url&quot;];
$adding_date = date(&quot;Y-m-d&quot;,strtotime($contentR[&quot;adding_date&quot;]));
echo(&quot;&lt;url&gt;
&lt;loc&gt;http://www.example.com/&quot;.$url.&quot;&lt;/loc&gt;
&lt;lastmod&gt;&quot;.$adding_date.&quot;&lt;/lastmod&gt;
&lt;/url&gt;
&quot;);
}
$content2Q = mysql_query(&quot;SELECT * FROM content2_table&quot;);
while($content2R = mysql_fetch_array($content2Q))
{
$url = $content2R[&quot;url&quot;];
$adding_date = date(&quot;Y-m-d&quot;,strtotime($content2R[&quot;adding_date&quot;]));
echo(&quot;&lt;url&gt;
&lt;loc&gt;http://www.example.com/&quot;.$url.&quot;&lt;/loc&gt;
&lt;lastmod&gt;&quot;.$adding_date.&quot;&lt;/lastmod&gt;
&lt;/url&gt;
&quot;);
}
echo(&quot;&lt;/urlset&gt;&quot;);
?&gt;
</pre>
<p><strong>Google Sitemap Plugins for Wordpress</strong><br />
<a href="http://www.dicontas.co.uk/blog/google-sitemap-utw-tag-wordpress-plugin/">http://www.dicontas.co.uk/blog/google-sitemap-utw-tag-wordpress-plugin/</a><br />
<a href="http://www.arnebrachhold.de/redir/sitemap-home/">http://www.arnebrachhold.de/redir/sitemap-home/</a><br />
<a href="http://www.karailiev.net/karailievs-sitemap/">http://www.karailiev.net/karailievs-sitemap/</a><br />
<a href="http://southcoastwebsites.co.uk/wordpress/">http://southcoastwebsites.co.uk/wordpress/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/creating-google-sitemap-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculate Last Week, Last Month in Mysql</title>
		<link>http://www.webmastersucks.com/calculate-last-week-last-month-in-mysql/</link>
		<comments>http://www.webmastersucks.com/calculate-last-week-last-month-in-mysql/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 07:49:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[curdate]]></category>
		<category><![CDATA[current date]]></category>
		<category><![CDATA[date calculation]]></category>
		<category><![CDATA[date_add]]></category>
		<category><![CDATA[last month]]></category>
		<category><![CDATA[last week]]></category>
		<category><![CDATA[yesterday]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=52</guid>
		<description><![CDATA[
			
				
			
		
We need get datas from last week, last month, yesterday and today. We can do it easily in MySQL.
Getting Current Date
SELECT CURDATE();
Result : 2009-06-04
Getting Last Week Datas
SELECT DATE_ADD('2009-06-04', INTERVAL 7 DAY);
Getting Last Month Datas
SELECT DATE_ADD('2009-06-04', 1 MONTH);
Getting Last Year Datas
SELECT DATE_ADD('2009-06-04', INTERVAL 1 YEAR);
And Php example for this calculations, getting last month orders
mysql_query(&#34;SELECT * FROM [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fcalculate-last-week-last-month-in-mysql%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fcalculate-last-week-last-month-in-mysql%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>We need get datas from last week, last month, yesterday and today. We can do it easily in MySQL.</p>
<p><strong>Getting Current Date</strong></p>
<pre class="brush: plain;">SELECT CURDATE();</pre>
<p><strong>Result :</strong> 2009-06-04</p>
<p><strong>Getting Last Week Datas</strong></p>
<pre class="brush: plain;">SELECT DATE_ADD('2009-06-04', INTERVAL 7 DAY);</pre>
<p><strong>Getting Last Month Datas</strong></p>
<pre class="brush: plain;">SELECT DATE_ADD('2009-06-04', 1 MONTH);</pre>
<p><strong>Getting Last Year Datas</strong></p>
<pre class="brush: plain;">SELECT DATE_ADD('2009-06-04', INTERVAL 1 YEAR);</pre>
<p>And Php example for this calculations, getting last month orders</p>
<pre class="brush: php;">mysql_query(&quot;SELECT * FROM orders WHERE DATE_SUB(CURDATE(),INTERVAL 1 month) &lt;= order_date&quot;)); </pre>
<p>For more information of Date and time functions :<br />
<a href="http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html">http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/calculate-last-week-last-month-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change MySQL Password via SSH</title>
		<link>http://www.webmastersucks.com/change-mysql-password-via-ssh/</link>
		<comments>http://www.webmastersucks.com/change-mysql-password-via-ssh/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 10:08:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=37</guid>
		<description><![CDATA[
			
				
			
		
login ssh, type mysqladmin. A tip if you can not remember mysql password type
mysql -uadmin -p`cat /etc/psa/.psa.shadow`

mysql&#62; USE mysql;
mysql&#62; SELECT * FROM user;
mysql&#62; SET PASSWORD FOR 'username'@'hostname' = PASSWORD('password_here');
mysql&#62; FLUSH PRIVILEGES;

]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fchange-mysql-password-via-ssh%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fchange-mysql-password-via-ssh%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>login ssh, type mysqladmin. A tip if you can not remember mysql password type</p>
<pre class="brush: plain;">mysql -uadmin -p`cat /etc/psa/.psa.shadow`</pre>
<pre class="brush: plain;">
mysql&gt; USE mysql;
mysql&gt; SELECT * FROM user;
mysql&gt; SET PASSWORD FOR 'username'@'hostname' = PASSWORD('password_here');
mysql&gt; FLUSH PRIVILEGES;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/change-mysql-password-via-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>User Login Form with Javascript Md5</title>
		<link>http://www.webmastersucks.com/user-login-form-with-javascript-md5/</link>
		<comments>http://www.webmastersucks.com/user-login-form-with-javascript-md5/#comments</comments>
		<pubDate>Sun, 31 May 2009 14:48:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[javascript md5]]></category>
		<category><![CDATA[login form]]></category>
		<category><![CDATA[md5]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=20</guid>
		<description><![CDATA[
			
				
			
		
Web servers uses Plain-Text form based authentication. If an attacker with access to the network traffic to and from the target host may be able to obtain login credentials for other users by sniffing the network traffic. Solutions is data sent via HTML login forms is encrypted before being sent from the client to the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fuser-login-form-with-javascript-md5%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fuser-login-form-with-javascript-md5%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Web servers uses Plain-Text form based authentication. If an attacker with access to the network traffic to and from the target host may be able to obtain login credentials for other users by sniffing the network traffic. Solutions is data sent via HTML login forms is encrypted before being sent from the client to the host. We solve this problem using encoding form with md5. But there is no standart md5() function in javascript, we find javascript md5 function with a little search (<a href="http://www.miekenet.de/publikationen/publi01.html">Md5 mit Javascript</a>). We create a hidden form to our secure login. When we submit the forum our code change our &#8220;user&#8221; and &#8220;password&#8221; to md5 and send with hidden form encoded values.</p>
<p><strong>Our Login Code (login.html)</strong></p>
<pre class="brush: xml;">
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Login Form&lt;/title&gt;
&lt;script language=&quot;javascript&quot; src=&quot;md5.js&quot;&gt;&lt;/script&gt;
&lt;script language=&quot;javascript&quot;&gt;
&lt;!--
function passResponse() {
document.hform.user.value = MD5(document.login.user_temp.value);
document.hform.pass.value = MD5(document.login.pass_temp.value);
document.login.pass_temp.value = &quot;&quot;;
document.hform.submit();

}
// --&gt;
&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;form name=&quot;login&quot;&gt;
Username:
&lt;input type=&quot;text&quot; name=&quot;user_temp&quot; size=32 maxlength=32&gt;&lt;br&gt;
Password:
&lt;input type=&quot;password&quot; name=&quot;pass_temp&quot; size=32 maxlength=32&gt;&lt;br&gt;
&lt;input onClick=&quot;passResponse(); return false;&quot; type=&quot;submit&quot; name=&quot;submitbtn&quot; value=&quot;Login now&quot;&gt;
&lt;/form&gt;
&lt;form action=&quot;login.php&quot; METHOD=&quot;POST&quot; name=&quot;hform&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;user&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;pass&quot;&gt;
&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>login.php </p>
<pre class="brush: php;">
&lt;?
$user = $_POST[&quot;user&quot;];
$pass = $_POST[&quot;pass&quot;];
mysql_query(&quot;SELECT * FROM users WHERE MD5(username) = '$user' AND password = '$pass'&quot;);
//... Code is continue ...
?&gt;
</pre>
<p><strong>md5.js file</strong></p>
<pre class="brush: jscript;">
/*
 *  md5.js 1.0b 27/06/96
 *
 * Javascript implementation of the RSA Data Security, Inc. MD5
 * Message-Digest Algorithm.
 *
 * Copyright (c) 1996 Henri Torgemane. All Rights Reserved.
 *
 * Permission to use, copy, modify, and distribute this software
 * and its documentation for any purposes and without
 * fee is hereby granted provided that this copyright notice
 * appears in all copies.
 *
 * Of course, this soft is provided &quot;as is&quot; without express or implied
 * warranty of any kind.
 *
 *
 * Modified with german comments and some information about collisions.
 * (Ralf Mieke, ralf@miekenet.de, http://mieke.home.pages.de)
 */

function array(n) {
  for(i=0;i&lt;n;i++) this[i]=0;
  this.length=n;
}

/* Einige grundlegenden Funktionen müssen wegen
 * Javascript Fehlern umgeschrieben werden.
 * Man versuche z.B. 0xffffffff &gt;&gt; 4 zu berechnen..
 * Die nun verwendeten Funktionen sind zwar langsamer als die Originale,
 * aber sie funktionieren.
 */

function integer(n) { return n%(0xffffffff+1); }

function shr(a,b) {
  a=integer(a);
  b=integer(b);
  if (a-0x80000000&gt;=0) {
    a=a%0x80000000;
    a&gt;&gt;=b;
    a+=0x40000000&gt;&gt;(b-1);
  } else
    a&gt;&gt;=b;
  return a;
}

function shl1(a) {
  a=a%0x80000000;
  if (a&amp;0x40000000==0x40000000)
  {
    a-=0x40000000;
    a*=2;
    a+=0x80000000;
  } else
    a*=2;
  return a;
}

function shl(a,b) {
  a=integer(a);
  b=integer(b);
  for (var i=0;i&lt;b;i++) a=shl1(a);
  return a;
}

function and(a,b) {
  a=integer(a);
  b=integer(b);
  var t1=(a-0x80000000);
  var t2=(b-0x80000000);
  if (t1&gt;=0)
    if (t2&gt;=0)
      return ((t1&amp;t2)+0x80000000);
    else
      return (t1&amp;b);
  else
    if (t2&gt;=0)
      return (a&amp;t2);
    else
      return (a&amp;b);
}

function or(a,b) {
  a=integer(a);
  b=integer(b);
  var t1=(a-0x80000000);
  var t2=(b-0x80000000);
  if (t1&gt;=0)
    if (t2&gt;=0)
      return ((t1|t2)+0x80000000);
    else
      return ((t1|b)+0x80000000);
  else
    if (t2&gt;=0)
      return ((a|t2)+0x80000000);
    else
      return (a|b);
}

function xor(a,b) {
  a=integer(a);
  b=integer(b);
  var t1=(a-0x80000000);
  var t2=(b-0x80000000);
  if (t1&gt;=0)
    if (t2&gt;=0)
      return (t1^t2);
    else
      return ((t1^b)+0x80000000);
  else
    if (t2&gt;=0)
      return ((a^t2)+0x80000000);
    else
      return (a^b);
}

function not(a) {
  a=integer(a);
  return (0xffffffff-a);
}

/* Beginn des Algorithmus */

    var state = new array(4);
    var count = new array(2);
        count[0] = 0;
        count[1] = 0;
    var buffer = new array(64);
    var transformBuffer = new array(16);
    var digestBits = new array(16);

    var S11 = 7;
    var S12 = 12;
    var S13 = 17;
    var S14 = 22;
    var S21 = 5;
    var S22 = 9;
    var S23 = 14;
    var S24 = 20;
    var S31 = 4;
    var S32 = 11;
    var S33 = 16;
    var S34 = 23;
    var S41 = 6;
    var S42 = 10;
    var S43 = 15;
    var S44 = 21;

    function F(x,y,z) {
        return or(and(x,y),and(not(x),z));
    }

    function G(x,y,z) {
        return or(and(x,z),and(y,not(z)));
    }

    function H(x,y,z) {
        return xor(xor(x,y),z);
    }

    function I(x,y,z) {
        return xor(y ,or(x , not(z)));
    }

    function rotateLeft(a,n) {
        return or(shl(a, n),(shr(a,(32 - n))));
    }

    function FF(a,b,c,d,x,s,ac) {
        a = a+F(b, c, d) + x + ac;
        a = rotateLeft(a, s);
        a = a+b;
        return a;
    }

    function GG(a,b,c,d,x,s,ac) {
        a = a+G(b, c, d) +x + ac;
        a = rotateLeft(a, s);
        a = a+b;
        return a;
    }

    function HH(a,b,c,d,x,s,ac) {
        a = a+H(b, c, d) + x + ac;
        a = rotateLeft(a, s);
        a = a+b;
        return a;
    }

    function II(a,b,c,d,x,s,ac) {
        a = a+I(b, c, d) + x + ac;
        a = rotateLeft(a, s);
        a = a+b;
        return a;
    }

    function transform(buf,offset) {
        var a=0, b=0, c=0, d=0;
        var x = transformBuffer;

        a = state[0];
        b = state[1];
        c = state[2];
        d = state[3];

        for (i = 0; i &lt; 16; i++) {
            x[i] = and(buf[i*4+offset],0xff);
            for (j = 1; j &lt; 4; j++) {
                x[i]+=shl(and(buf[i*4+j+offset] ,0xff), j * 8);
            }
        }

        /* Runde 1 */
        a = FF ( a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
        d = FF ( d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
        c = FF ( c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
        b = FF ( b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
        a = FF ( a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
        d = FF ( d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
        c = FF ( c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
        b = FF ( b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
        a = FF ( a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
        d = FF ( d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
        c = FF ( c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
        b = FF ( b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
        a = FF ( a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
        d = FF ( d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
        c = FF ( c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
        b = FF ( b, c, d, a, x[15], S14, 0x49b40821); /* 16 */

        /* Runde 2 */
        a = GG ( a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
        d = GG ( d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
        c = GG ( c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
        b = GG ( b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
        a = GG ( a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
        d = GG ( d, a, b, c, x[10], S22,  0x2441453); /* 22 */
        c = GG ( c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
        b = GG ( b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
        a = GG ( a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
        d = GG ( d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
        c = GG ( c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
        b = GG ( b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
        a = GG ( a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
        d = GG ( d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
        c = GG ( c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
        b = GG ( b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */

        /* Runde 3 */
        a = HH ( a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
        d = HH ( d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
        c = HH ( c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
        b = HH ( b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
        a = HH ( a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
        d = HH ( d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
        c = HH ( c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
        b = HH ( b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
        a = HH ( a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
        d = HH ( d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
        c = HH ( c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
        b = HH ( b, c, d, a, x[ 6], S34,  0x4881d05); /* 44 */
        a = HH ( a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
        d = HH ( d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
        c = HH ( c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
        b = HH ( b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */

        /* Runde 4 */
        a = II ( a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
        d = II ( d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
        c = II ( c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
        b = II ( b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
        a = II ( a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
        d = II ( d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
        c = II ( c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
        b = II ( b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
        a = II ( a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
        d = II ( d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
        c = II ( c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
        b = II ( b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
        a = II ( a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
        d = II ( d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
        c = II ( c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
        b = II ( b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */

        state[0] +=a;
        state[1] +=b;
        state[2] +=c;
        state[3] +=d;

    }
    /* Mit der Initialisierung von Dobbertin:
       state[0] = 0x12ac2375;
       state[1] = 0x3b341042;
       state[2] = 0x5f62b97c;
       state[3] = 0x4ba763ed;
       gibt es eine Kollision:

       begin 644 Message1
       M7MH=JO6_&gt;MG!X?!51$)W,CXV!A&quot;=(!AR71,&lt;X`Y-IIT9^Z&amp;8L$2N'Y*Y:R.;
       39GIK9&gt;TF$W()/MEHR%C4:G1R:Q&quot;=
       `
       end

       begin 644 Message2
       M7MH=JO6_&gt;MG!X?!51$)W,CXV!A&quot;=(!AR71,&lt;X`Y-IIT9^Z&amp;8L$2N'Y*Y:R.;
       39GIK9&gt;TF$W()/MEHREC4:G1R:Q&quot;=
       `
       end
    */
    function init() {
        count[0]=count[1] = 0;
        state[0] = 0x67452301;
        state[1] = 0xefcdab89;
        state[2] = 0x98badcfe;
        state[3] = 0x10325476;
        for (i = 0; i &lt; digestBits.length; i++)
            digestBits[i] = 0;
    }

    function update(b) {
        var index,i;

        index = and(shr(count[0],3) , 0x3f);
        if (count[0]&lt;0xffffffff-7)
          count[0] += 8;
        else {
          count[1]++;
          count[0]-=0xffffffff+1;
          count[0]+=8;
        }
        buffer[index] = and(b,0xff);
        if (index  &gt;= 63) {
            transform(buffer, 0);
        }
    }

    function finish() {
        var bits = new array(8);
        var        padding;
        var        i=0, index=0, padLen=0;

        for (i = 0; i &lt; 4; i++) {
            bits[i] = and(shr(count[0],(i * 8)), 0xff);
        }
        for (i = 0; i &lt; 4; i++) {
            bits[i+4]=and(shr(count[1],(i * 8)), 0xff);
        }
        index = and(shr(count[0], 3) ,0x3f);
        padLen = (index &lt; 56) ? (56 - index) : (120 - index);
        padding = new array(64);
        padding[0] = 0x80;
        for (i=0;i&lt;padLen;i++)
          update(padding[i]);
        for (i=0;i&lt;8;i++)
          update(bits[i]);

        for (i = 0; i &lt; 4; i++) {
            for (j = 0; j &lt; 4; j++) {
                digestBits[i*4+j] = and(shr(state[i], (j * 8)) , 0xff);
            }
        }
    }

/* Ende des MD5 Algorithmus */

function hexa(n) {
 var hexa_h = &quot;0123456789abcdef&quot;;
 var hexa_c=&quot;&quot;;
 var hexa_m=n;
 for (hexa_i=0;hexa_i&lt;8;hexa_i++) {
   hexa_c=hexa_h.charAt(Math.abs(hexa_m)%16)+hexa_c;
   hexa_m=Math.floor(hexa_m/16);
 }
 return hexa_c;
}

var ascii=&quot;01234567890123456789012345678901&quot; +
          &quot; !\&quot;#$%&amp;'()*+,-./0123456789:;&lt;=&gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;+
          &quot;[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~&quot;;

function MD5(nachricht)
{
 var l,s,k,ka,kb,kc,kd;

 init();
 for (k=0;k&lt;nachricht.length;k++) {
   l=nachricht.charAt(k);
   update(ascii.lastIndexOf(l));
 }
 finish();
 ka=kb=kc=kd=0;
 for (i=0;i&lt;4;i++) ka+=shl(digestBits[15-i], (i*8));
 for (i=4;i&lt;8;i++) kb+=shl(digestBits[15-i], ((i-4)*8));
 for (i=8;i&lt;12;i++) kc+=shl(digestBits[15-i], ((i-8)*8));
 for (i=12;i&lt;16;i++) kd+=shl(digestBits[15-i], ((i-12)*8));
 s=hexa(kd)+hexa(kc)+hexa(kb)+hexa(ka);
 return s;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/user-login-form-with-javascript-md5/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Converting Unescape Chars in MySQL for SEO</title>
		<link>http://www.webmastersucks.com/converting-unescape-chars-in-mysql-for-seo/</link>
		<comments>http://www.webmastersucks.com/converting-unescape-chars-in-mysql-for-seo/#comments</comments>
		<pubDate>Sat, 30 May 2009 07:40:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[search engine optimization]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=12</guid>
		<description><![CDATA[
			
				
			
		
Sometimes, i need to convert datas for search engine optimization (SEO). I use MySQL replace command for this. Just login to phpmyadmin or any tool for run SQL command. Paste command set, change table and field name than run.

UPDATE table SET field = replace(field, 'À','A');
UPDATE table SET field = replace(field, 'Á','A');
UPDATE table SET field = [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fconverting-unescape-chars-in-mysql-for-seo%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fconverting-unescape-chars-in-mysql-for-seo%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Sometimes, i need to convert datas for search engine optimization (SEO). I use MySQL replace command for this. Just login to phpmyadmin or any tool for run SQL command. Paste command set, change table and field name than run.</p>
<pre class="brush: php;">
UPDATE table SET field = replace(field, 'À','A');
UPDATE table SET field = replace(field, 'Á','A');
UPDATE table SET field = replace(field, 'Â','A');
UPDATE table SET field = replace(field, 'Ã','A');
UPDATE table SET field = replace(field, 'Ä','A');
UPDATE table SET field = replace(field, 'Å','A');
UPDATE table SET field = replace(field, 'Æ','AE');
UPDATE table SET field = replace(field, 'Ç','C');
UPDATE table SET field = replace(field, 'È','E');
UPDATE table SET field = replace(field, 'É','E');
UPDATE table SET field = replace(field, 'Ê','E');
UPDATE table SET field = replace(field, 'Ë','E');
UPDATE table SET field = replace(field, 'Ì','I');
UPDATE table SET field = replace(field, 'Í','I');
UPDATE table SET field = replace(field, 'Î','I');
UPDATE table SET field = replace(field, 'Ï','I');
UPDATE table SET field = replace(field, 'Ò','O');
UPDATE table SET field = replace(field, 'Ó','O');
UPDATE table SET field = replace(field, 'Ô','O');
UPDATE table SET field = replace(field, 'Õ','O');
UPDATE table SET field = replace(field, 'Ö','O');
UPDATE table SET field = replace(field, '×','Z');
UPDATE table SET field = replace(field, 'Ø','O');
UPDATE table SET field = replace(field, 'Ù','U');
UPDATE table SET field = replace(field, 'Ú','U');
UPDATE table SET field = replace(field, 'Û','U');
UPDATE table SET field = replace(field, 'Ü','U');
UPDATE table SET field = replace(field, 'ß','ss');
UPDATE table SET field = replace(field, 'à','a');
UPDATE table SET field = replace(field, 'á','a');
UPDATE table SET field = replace(field, 'â','a');
UPDATE table SET field = replace(field, 'ã','a');
UPDATE table SET field = replace(field, 'ä','a');
UPDATE table SET field = replace(field, 'å','a');
UPDATE table SET field = replace(field, 'æ','ae');
UPDATE table SET field = replace(field, 'ç','c');
UPDATE table SET field = replace(field, 'è','e');
UPDATE table SET field = replace(field, 'é','e');
UPDATE table SET field = replace(field, 'ê','e');
UPDATE table SET field = replace(field, 'ë','e');
UPDATE table SET field = replace(field, 'ì','i');
UPDATE table SET field = replace(field, 'í','i');
UPDATE table SET field = replace(field, 'î','i');
UPDATE table SET field = replace(field, 'ï','i');
UPDATE table SET field = replace(field, 'ñ','n');
UPDATE table SET field = replace(field, 'ü','u');
UPDATE table SET field = replace(field, 'ò','o');
UPDATE table SET field = replace(field, 'ó','o');
UPDATE table SET field = replace(field, 'ô','o');
UPDATE table SET field = replace(field, 'õ','o');
UPDATE table SET field = replace(field, 'ö','o');
UPDATE table SET field = replace(field, 'ø','o');
UPDATE table SET field = replace(field, 'ù','u');
UPDATE table SET field = replace(field, 'ú','u');
UPDATE table SET field = replace(field, 'û','u');
UPDATE table SET field = replace(field, 'ÿ','y');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/converting-unescape-chars-in-mysql-for-seo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forgot WordPress Admin Password</title>
		<link>http://www.webmastersucks.com/forgot-wordpress-admin-password/</link>
		<comments>http://www.webmastersucks.com/forgot-wordpress-admin-password/#comments</comments>
		<pubDate>Wed, 27 May 2009 14:33:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[md5]]></category>
		<category><![CDATA[password]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=1</guid>
		<description><![CDATA[
			
				
			
		
Firstly; you need access to your MySQL Server and maybe access to your wp-config.php file in the root of your site.

Go www.md5-creator.com and type in a password you want to use.Example type &#8220;123&#8243; then copy. &#8220;123 in MD5 :&#8221; &#8217;s result is &#8220;202cb962ac59075b964b07152d234b70&#8243;
Than open your MySQL database, and click the wp_users table
Change &#8220;user_pass&#8221; value to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fforgot-wordpress-admin-password%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fforgot-wordpress-admin-password%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Firstly; you need access to your MySQL Server and maybe access to your wp-config.php file in the root of your site.</p>
<ol>
<li>Go <a href="http://www.md5-creator.com">www.md5-creator.com</a> and type in a password you want to use.Example type &#8220;123&#8243; then copy. &#8220;123 in MD5 :&#8221; &#8217;s result is &#8220;202cb962ac59075b964b07152d234b70&#8243;</li>
<li>Than open your MySQL database, and click the wp_users table</li>
<li>Change &#8220;user_pass&#8221; value to copied value. In our example &#8220;202cb962ac59075b964b07152d234b70&#8243;</li>
<li>Now go to your blog and log in <img src='http://www.webmastersucks.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/forgot-wordpress-admin-password/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
