﻿<?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>Ladysign Dev Blog &#187; sql</title>
	<atom:link href="http://www.ladysign-apps.com/blog/category/code/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ladysign-apps.com/blog</link>
	<description>Girls can code.</description>
	<lastBuildDate>Mon, 01 Feb 2010 09:44:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Migrating from Joomla to Wordpress</title>
		<link>http://www.ladysign-apps.com/blog/code/sql/migrating-from-joomla-to-wordpress/</link>
		<comments>http://www.ladysign-apps.com/blog/code/sql/migrating-from-joomla-to-wordpress/#comments</comments>
		<pubDate>Sun, 03 May 2009 09:09:29 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[joomla]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Joomla to Wordpress]]></category>
		<category><![CDATA[Mambo]]></category>
		<category><![CDATA[Mambo to Joomla]]></category>
		<category><![CDATA[MD5]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[password encryption]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[Porting]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=664</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>One of my websites is build on the CMS Joomla. These days I&#8217;m much more comfortable with Wordpress.<br />
Today I will gu[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>One of my websites is build on the CMS Joomla. These days I&#8217;m much more comfortable with Wordpress.<br />
Today I will guide you, how to easy migrate from Joomla/Mambo to Wordpress.</p>
<p><strong>Migrating Articles from Mambo/Joomla to Wordpress</strong><br />
With <a href="http://www.blevins.nl/missiontech/">this wizzard from Rodney Blevins </a>you can migrate Mambo/Joomla articles and links very easy to Wordpress.<br />
Unfortunately migrating the links didn&#8217;t really work for my Wordpress 2.7.</p>
<p><em>Notice that for this wizzard, both installations of Mambo/Joomla and Wordpress need to be on the same webserver installed.</em></p>
<ol>
<li>Download the wizzard from the above link.</li>
<li>Create a new folder &#8220;export&#8221; in the root of your Wordpress installation.</li>
<li>Edit the config.php file, with the database name, username, password of Mambo/Joomla and Wordpress database settings.</li>
<li>Incase you have Joomla installed, or you changed the database prefix; you&#8217;ll have to edit the var: &#8220;$dbprefix&#8221; to your prefix. For example: &#8220;mos_&#8221; to: &#8220;jos_&#8221;.</li>
<li>Incase the database prefix for the Wordpress DB is different then &#8220;wp_&#8221;; open up the index.php file, and search / replace all: &#8220;wp_&#8221; and change it manually to your prefix. For example: &#8220;wp_&#8221; to &#8220;lee_&#8221;.</li>
<li>Now save and upload the index.php and config.php files to the export folder</li>
<li>Surf to http://your-wp-installation/export and follow the steps to import your articles or links into Wordpress.</li>
</ol>
<p><strong>Removing Mambo/Joomla tags from Wordpress posts</strong><br />
Now when your done, it could be that your Wordpress post message contain Joomla tags in the post.<br />
Tags like: &#8220;{mosimage}&#8221; or plugin based tags like: &#8220;{rokaccess}&#8221;.<br />
You can easily remove these tags from all your post with some database queries.<br />
Open phpMyAdmin and within your Wordpress database, press the SQL tab.</p>
<p>To see how many post I have with Mambo/Joomla tags, I used this query:</p>
<pre class="brush: sql;">
SELECT * FROM wp_posts WHERE post_content LIKE &amp;quot;%{%&amp;quot;
</pre>
<p>I noticed by the retrieved list, that some of my posts contain the {mosimage} tag.<br />
To remove (replace to empty string) these tags and update my posts, I used the following query:</p>
<pre class="brush: sql;">
UPDATE wp_posts SET post_content = replace(post_content, &amp;quot;{mosimage}&amp;quot;, &amp;quot;&amp;quot;);
</pre>
<p>Just another check, to see if 0 posts return, if I search in my Wordpress database for the {mosimage} tag:</p>
<pre class="brush: sql;">
SELECT * FROM wp_posts WHERE post_content LIKE &amp;quot;{mosimage}&amp;quot;
</pre>
<p><strong>Migrating users</strong><br />
The next important thing to migrate, will be the user database.<br />
Let&#8217;s compare both XML exports from phpMyAdmin, to see the table structures:</p>
<p>Joomla Export:</p>
<pre class="brush: xml;">
&amp;lt;jos_users&amp;gt;
    &amp;lt;id&amp;gt;64&amp;lt;/id&amp;gt;
    &amp;lt;name&amp;gt;Lee&amp;lt;/name&amp;gt;
    &amp;lt;username&amp;gt;Lee&amp;lt;/username&amp;gt;
    &amp;lt;email&amp;gt;my@email.nl&amp;lt;/email&amp;gt;
    &amp;lt;password&amp;gt;###&amp;lt;/password&amp;gt;
    &amp;lt;usertype&amp;gt;Super Administrator&amp;lt;/usertype&amp;gt;
    &amp;lt;block&amp;gt;0&amp;lt;/block&amp;gt;
    &amp;lt;sendEmail&amp;gt;0&amp;lt;/sendEmail&amp;gt;
    &amp;lt;gid&amp;gt;25&amp;lt;/gid&amp;gt;
    &amp;lt;registerDate&amp;gt;2007-07-25 21:57:51&amp;lt;/registerDate&amp;gt;
    &amp;lt;lastvisitDate&amp;gt;2009-05-01 18:01:52&amp;lt;/lastvisitDate&amp;gt;
    &amp;lt;activation&amp;gt;&amp;lt;/activation&amp;gt;
    &amp;lt;params&amp;gt;editor=none&amp;lt;/params&amp;gt;
&amp;lt;/jos_users&amp;gt;
</pre>
<p>Same Export in Wordpress would be:</p>
<pre class="brush: xml;">
&amp;lt;wp_users&amp;gt;
    &amp;lt;user_login&amp;gt;Lee&amp;lt;/user_login&amp;gt;
    &amp;lt;user_pass&amp;gt;&amp;lt;/user_pass&amp;gt;
    &amp;lt;user_nicename&amp;gt;Lee&amp;lt;/user_nicename&amp;gt;
    &amp;lt;user_email&amp;gt;my@email.nl&amp;lt;/user_email&amp;gt;
    &amp;lt;user_url&amp;gt;http://www.ladysign.nl&amp;lt;/user_url&amp;gt;
    &amp;lt;user_registered&amp;gt;2007-07-25 21:57:51&amp;lt;&amp;lt;/user_registered&amp;gt;
    &amp;lt;user_activation_key&amp;gt;&amp;lt;/user_activation_key&amp;gt;
    &amp;lt;user_status&amp;gt;0&amp;lt;/user_status&amp;gt;
    &amp;lt;display_name&amp;gt;Lee&amp;lt;/display_name&amp;gt;
&amp;lt;/wp_users&amp;gt;
</pre>
<p>Be replacing the table names in the export, or writing a nice script which creates a INSERT INTO query,<br />
you can prefill the Wordpress database with the users from the Mambo/Joomla user table.<br />
However, there will be one problem.</p>
<p><strong>Password encryption</strong><br />
And that problem is setting over the passwords.<br />
Joomla! 1.5 uses MD5 to hash the passwords.  When the passwords are created, they are hashed with a 32 character salt that is appended to the end of the password string.<br />
The password is stored as {TOTAL HASH}:{ORIGINAL SALT}.<br />
That&#8217;s diffrent then the MD5 encryption of Wordpress.<br />
For now I&#8217;ll solve this, by removing all the Wordpress passwords, and let the user recreate a new one via &#8216;lost password&#8217;.<br />
This is ofcourse not a nice solution. Does anyone has an idea?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/sql/migrating-from-joomla-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>6 popular Javascript Frameworks</title>
		<link>http://www.ladysign-apps.com/blog/code/javascript/5-popular-javascript-frameworks/</link>
		<comments>http://www.ladysign-apps.com/blog/code/javascript/5-popular-javascript-frameworks/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 09:20:37 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Dojo]]></category>
		<category><![CDATA[Javascript Frameworks]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Mootools]]></category>
		<category><![CDATA[Prototype]]></category>
		<category><![CDATA[Spry]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=648</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>Javascript frameworks are for easing development and dynamic web apps.<br />
These toolkits enables you to deal with Ajax calls[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>Javascript frameworks are for easing development and dynamic web apps.<br />
These toolkits enables you to deal with Ajax calls in an easy and fun way and it&#8217;s also cross browser safe.</p>
<p>It can be handy, if you know already something about <a href="http://www.json.org">JSON</a>:<br />
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write and it is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition &#8211; December 1999.<br />
JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.</p>
<p>It&#8217;s a personal choice which of the Javascript Frameworks you should choose.<br />
Basically they are all more or less providing you the same functionality, and they all<br />
contain excellent documentation and API&#8217;s with examples.<br />
I will show you the 6 most popular frameworks, and tell you the current version,<br />
download link and which websites these frameworks use. Also the size of the .js file,<br />
which is an important detail.</p>
<table border="1" cellpadding="1" cellspacing="1" align="center">
<tr>
<th></th>
<th align="center"><a href="http://jquery.com/">JQuery</a></th>
<th align="center"><a href="http://www.prototypejs.org">Prototype</a></th>
<th align="center"><a href="http://www.dojotoolkit.org/">Dojo</a></th>
<th align="center"><a href="http://www.mootools.net/">Mootools</a></th>
<th align="center"><a href="http://labs.adobe.com/technologies/spry/home.html">Spry</a></th>
<th align="center"><a href="http://developer.yahoo.com/yui/">YUI</a></th>
</tr>
<tr>
<td><b>Version:</b></td>
<td>1.3.2</td>
<td>1.6.0.3</td>
<td>1.3.0</td>
<td>1.2.2.</td>
<td>1.6.1</td>
<td>2.7.0</td>
</tr>
<tr>
<td><b>Size:</b></td>
<td>56KB / 117kB *</td>
<td>127KB</td>
<td>80KB / 305kB *</td>
<td>64KB / 97kB * </td>
<td>4.88MB</td>
<td>11.7MB</td>
</tr>
<tr>
<td><b>Clients</b></td>
<td><em>Google, Dell, Mozilla, Bank of America (Microsoft, Nokia)</em></td>
<td><em>Apple, CNN, Twitter, Digg, eBAY, Sony, Prada, Wired, Amazon</em></td>
<td><em>Salesforce, IBM, AOL, Apple, Ask.com, SUN, Zend Framework, Lufthansa</em></td>
<td><em>Joomla, Nintendo, Gamespot, W3C, Netvibes</em></td>
<td><em>Adobe</em></td>
<td><em>Yahoo, KLM</em></td>
</tr>
</table>
<p>* = compressed gzipped / uncompressed</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/javascript/5-popular-javascript-frameworks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>4 checks for diagnosing remote database connection problems</title>
		<link>http://www.ladysign-apps.com/blog/code/sql/4-checks-for-diagnosing-oracle-db-connection-problems/</link>
		<comments>http://www.ladysign-apps.com/blog/code/sql/4-checks-for-diagnosing-oracle-db-connection-problems/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 09:51:42 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[sql]]></category>
		<category><![CDATA[database problems]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[tns]]></category>
		<category><![CDATA[tns listener]]></category>
		<category><![CDATA[tnsping]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=552</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>There are 4 main checks for diagnosing remote database connection problems:</p>
<ul>
<li>tnsnames.ora</li>
<li>Oracle class path</li>
<li>ping</li>
<li>tnsping</li>
[......]</ul>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>There are 4 main checks for diagnosing remote database connection problems:</p>
<ul>
<li>tnsnames.ora</li>
<li>Oracle class path</li>
<li>ping</li>
<li>tnsping</li>
</ul>
<h4>tnsnames.ora</h4>
<p>First check if the tnsnames.ora file has the correct database information/credentials.<br />
The tnsnames.ora file can be found in: \ORACLE\ora92\network\ADMIN<br />
These credentials should look like:</p>
<pre class="brush: sql;">
MYDATABSENAME =
	(DESCRIPTION=
		(ADDRESS_LIST=
			(ADDRESS=(PROTOCOL=TCP)(HOST=ladysign)(PORT=&lt;port 1111&gt;))
		)
		(CONNECT_DATA=
			(SERVICE_NAME=myServiceName)
		)
	)
</pre>
<h4>Oracle Class path</h4>
<p>Make sure oracle is in your class path.<br />
Press Windows Key + Break key; Advanced Tab > Environment Variables<br />
Make sure there is a ORACLE_HOME system variable. For example:<br />
ORACLE_HOME = C:\\ORACLE\ora92</p>
<h4>Ping</h4>
<p>The ping utility is used to test the connectivity to a remote machine.  ping will indicate whether a remote server is accessible and responding.  If the ping command indicates that a machine cannot be accessed, the other connectivity tests will also fail.<br />
U can use the ping command via the (DOS) command line; <em>ping <host name></em>. For example:</p>
<pre class="brush: jscript;">
C:\&gt;ping ladysign
Pinging ladysign [198.64.245.67] with 32 bytes of data:

Reply from 198.64.245.67: bytes=32 time&lt;10ms TTL=254
Reply from 198.64.245.67: bytes=32 time&lt;10ms TTL=254
Reply from 198.64.245.67: bytes=32 time&lt;10ms TTL=254
Reply from 198.64.245.67: bytes=32 time&lt;10ms TTL=254
</pre>
<h4>TNSPing</h4>
<p>When the connectivity to the host is confirmed with the ping command, the next connection to check is the listener.<br />
You can do this with the tnsping utility, which determines wheter or not an Oracle service can be succesfully reached.<br />
However, tnssping will only report if the listener process is up and provides no indication of the state of the database:<br />
For example:</p>
<pre class="brush: jscript;">
C:\&gt;tnsping MYDATABASENAME

TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 06-APR-2009 11:02:32

Copyright (c) 1997 Oracle Corporation.  All rights reserved.

Used parameter files:
C:\ORACLE\ora92\network\admin\sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=ladysign)(PORT=1111))) (CONNECT_DATA= (SERVICE_NAME=myDatabaseService)))
OK (80 msec)
OK (10 msec)
OK (10 msec)
OK (0 msec)
OK (10 msec)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/sql/4-checks-for-diagnosing-oracle-db-connection-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL oracle: don&#8217;t show empty values.</title>
		<link>http://www.ladysign-apps.com/blog/code/sql/sql-oracle-dont-show-empty-values/</link>
		<comments>http://www.ladysign-apps.com/blog/code/sql/sql-oracle-dont-show-empty-values/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 15:44:35 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[sql]]></category>
		<category><![CDATA[empty values]]></category>
		<category><![CDATA[not null]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=357</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>Ever wanted to query a resultset and received a whole bunch of results with empty values?<br />
Just query on select no empty v[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>Ever wanted to query a resultset and received a whole bunch of results with empty values?<br />
Just query on select no empty values.<br />
The query can look like this:</p>
<pre class="brush: sql;">
SELECT * FROM MY_TABLE WHERE CD_VAL = 'something' AND CD_VAL IS NOT NULL;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/sql/sql-oracle-dont-show-empty-values/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SQL &#8211; query on date</title>
		<link>http://www.ladysign-apps.com/blog/code/sql/sql-query-on-date/</link>
		<comments>http://www.ladysign-apps.com/blog/code/sql/sql-query-on-date/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 12:43:21 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[sql]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[to_date]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=264</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Say you want to query all the fields after a specific date.<br />
You&#8217;ll just write a sql with a value > then the filled i[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Say you want to query all the fields after a specific date.<br />
You&#8217;ll just write a sql with a value > then the filled in date.<br />
But how do you specify a date? You need the to_Date function for doing this.</p>
<pre class="brush: sql;">
TIMESTAMP &gt;= to_Date('20081203','yyyymmdd')
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/sql/sql-query-on-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
