<?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>arkinEx Codex &#187; database</title>
	<atom:link href="http://www.arkinex.com/contains/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.arkinex.com</link>
	<description>the place where all my code can be viewed</description>
	<lastBuildDate>Wed, 04 Nov 2009 20:39:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Using Regular Expressions in MySQL Queries</title>
		<link>http://www.arkinex.com/regular-expressions/89/using-regular-expressions-in-mysql-queries/</link>
		<comments>http://www.arkinex.com/regular-expressions/89/using-regular-expressions-in-mysql-queries/#comments</comments>
		<pubDate>Wed, 20 May 2009 13:38:06 +0000</pubDate>
		<dc:creator>arkin</dc:creator>
				<category><![CDATA[Regular Expressions]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://www.arkinex.com/?p=89</guid>
		<description><![CDATA[Here is an example of how you would select data based on a regular expression. SELECT phone FROM table WHERE phone REGEX '^[0-9 ]{11,14}$' = 0 LIMIT 100 The above would show all the phone numbers that are not between 11 and 14 numbers and spaces. SELECT phone FROM table WHERE phone REGEX '^[0-9 ]{11,14}$' [...]]]></description>
			<content:encoded><![CDATA[<p>Here is an example of how you would select data based on a regular expression.</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">SELECT</span> phone <span style="color: #990099; font-weight: bold;">FROM</span> <span style="color: #990099; font-weight: bold;">table</span> <span style="color: #990099; font-weight: bold;">WHERE</span> phone REGEX <span style="color: #008000;">'^[0-9 ]{11,14}$'</span> <span style="color: #CC0099;">=</span> <span style="color: #008080;">0</span> <span style="color: #990099; font-weight: bold;">LIMIT</span> <span style="color: #008080;">100</span></pre></div></div>

<p>The above would show all the phone numbers that <strong><span style="color: #ff0000;">are not</span></strong> between 11 and 14 numbers and spaces.</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">SELECT</span> phone <span style="color: #990099; font-weight: bold;">FROM</span> <span style="color: #990099; font-weight: bold;">table</span> <span style="color: #990099; font-weight: bold;">WHERE</span> phone REGEX <span style="color: #008000;">'^[0-9 ]{11,14}$'</span> <span style="color: #990099; font-weight: bold;">LIMIT</span> <span style="color: #008080;">100</span></pre></div></div>

<p>The above would show all the phone numbers that<strong><span style="color: #99cc00;"> are</span></strong> between 11 and 14 numbers and spaces.</p>
<p>I hope this quick guide has helped.<br />
Any questions, feel free to ask.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arkinex.com/regular-expressions/89/using-regular-expressions-in-mysql-queries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connecting to MySQL using TCL</title>
		<link>http://www.arkinex.com/tcl/49/tcl-connect-mysql-database/</link>
		<comments>http://www.arkinex.com/tcl/49/tcl-connect-mysql-database/#comments</comments>
		<pubDate>Sun, 14 Sep 2008 23:42:34 +0000</pubDate>
		<dc:creator>arkin</dc:creator>
				<category><![CDATA[TCL]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[eggdrop]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.arkinex.com/?p=49</guid>
		<description><![CDATA[So, lately i&#8217;ve been playing around with tcl again, and trying to make it work alongside MySQL to store information such as Q auth&#8217;s and various other information on users. Its working quite well. We connect to MySQL through TCL using a package called mysqltcl. Here is how I connect: # First we require the [...]]]></description>
			<content:encoded><![CDATA[<p>So, lately i&#8217;ve been playing around with tcl again, and trying to make it work alongside MySQL to store information such as Q auth&#8217;s and various other information on users. Its working quite well.</p>
<p>We connect to MySQL through TCL using a package called mysqltcl.</p>
<p>Here is how I connect:</p>

<div class="wp_syntax"><div class="code"><pre class="tcl" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># First we require the mysqltcl package. You normally have to install this.</span>
<span style="color: #008000;">package</span> require mysqltcl
&nbsp;
<span style="color: #ff7700;font-weight:bold;">set</span> db <span style="color: black;">&#91;</span>::<span style="color: black;">mysql</span>::<span style="color: black;">connect</span> -host localhost -user username -password password -db database<span style="color: black;">&#93;</span><span style="color: #66cc66;">;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Then perform an query...</span>
<span style="color: #808080; font-style: italic;"># JOIN</span>
<span style="color: #808080; font-style: italic;">#</span>
bind <span style="color: #008000;">join</span> - <span style="color: #66cc66;">*</span> rec:<span style="color: #008000;">join</span>
<span style="color: #ff7700;font-weight:bold;">proc</span> rec:<span style="color: #008000;">join</span> <span style="color: #483d8b;">{nick uhost hand chan}</span> <span style="color: black;">&#123;</span>
	<span style="color: #ff7700;font-weight:bold;">global</span> botnick db
	<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #483d8b;">{$nick == $botnick}</span> <span style="color: #483d8b;">{ return 0 }</span>
	<span style="color: #ff7700;font-weight:bold;">set</span> result <span style="color: black;">&#91;</span>::<span style="color: black;">mysql</span>::<span style="color: #008000;">exec</span> <span style="color: #ff3333;">$db</span> <span style="color: #483d8b;">&quot;INSERT INTO nicks (timestamp,channel,nickname) VALUES(UNIX_TIMESTAMP(),'$chan','$nick')&quot;</span><span style="color: black;">&#93;</span>
<span style="color: black;">&#125;</span></pre></div></div>

<p>As you can see, in my example we store the nickname and channel when someone joins a channel your bot is sitting in. A very useful module indeed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arkinex.com/tcl/49/tcl-connect-mysql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
