<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/11845" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2006-05-15T15:08:32-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/11845</id>

		<entry>
		<author><name><![CDATA[Danko]]></name></author>
		<updated>2006-05-15T15:08:32-04:00</updated>

		<published>2006-05-15T15:08:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63061#p63061</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63061#p63061"/>
		<title type="html"><![CDATA[Output to chan from MySQL db]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63061#p63061"><![CDATA[
Hoh, thanx - that worked like a charm. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>However, a second question qbout MySQL..<br>My db is MyISAM as described above.. However, when I'm adding data to it (checking if $name allready exists before adding) it's slow and 'hanging' the computer for 1-2 seconds.. I'm no sql guru, but what might I be doing wrong..?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7471">Danko</a> — Mon May 15, 2006 3:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-05-15T12:42:50-04:00</updated>

		<published>2006-05-15T12:42:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63056#p63056</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63056#p63056"/>
		<title type="html"><![CDATA[Output to chan from MySQL db]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63056#p63056"><![CDATA[
didnt you rather mean 'append line " but has moved to $newcity"'? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Mon May 15, 2006 12:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2006-05-15T12:12:58-04:00</updated>

		<published>2006-05-15T12:12:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63055#p63055</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63055#p63055"/>
		<title type="html"><![CDATA[Output to chan from MySQL db]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63055#p63055"><![CDATA[
There are several methods.<br><div class="codebox"><p>Code: </p><pre><code>  putquick "PRIVMSG $channel :Info ($id) $name is from $city[expr {[llength $newcity] ? " but has moved to $newcity" : ""}]" </code></pre></div>or something like,<br><div class="codebox"><p>Code: </p><pre><code>  set line "Info ($id) $name is from $city"  if {[llength $newcity]} {    lappend line "but has moved to $newcity"  }  putquick "PRIVMSG $channel :$line" </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Mon May 15, 2006 12:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Danko]]></name></author>
		<updated>2006-05-15T09:46:49-04:00</updated>

		<published>2006-05-15T09:46:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63048#p63048</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63048#p63048"/>
		<title type="html"><![CDATA[Output to chan from MySQL db]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63048#p63048"><![CDATA[
Hello, I'm using a small code for reading from a Mysql db and posting info to chan..<br>Here's my code:<div class="codebox"><p>Code: </p><pre><code>proc finduser {nick host hand channel arg} {global mysql  set search [string map {" " "%"} [lindex $arg]]  set query [mysqlsel $mysql(conn) "SELECT * FROM `users` WHERE `name` LIKE '$search' ORDER BY id DESC LIMIT 3" -list] if {$query==""} { putquick "PRIVMSG $channel :$arg not found." ; return }   foreach result $query {   set id [lindex $result 0]   set name [lindex $result 1]   set city [lindex $result 2]   set newcity [lindex $result 3]   putquick "PRIVMSG $channel :Info ($id) $name is from $city" } }</code></pre></div>This output to chan "Info ($id) $name is from $city" is usually okey when $newcity is blank<br>in mysql db, but if there's some text in newcity field in db, I'd like to change output to "Info ($id) $name is from $city <span style="color:blue">but has moved to $newcity</span>".<br>So how do I do that..?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7471">Danko</a> — Mon May 15, 2006 9:46 am</p><hr />
]]></content>
	</entry>
	</feed>
