<?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/8338" />

	<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>2004-09-28T17:23:07-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-09-28T17:23:07-04:00</updated>

		<published>2004-09-28T17:23:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=41393#p41393</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=41393#p41393"/>
		<title type="html"><![CDATA[Help with fetching info from a dbase]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=41393#p41393"><![CDATA[
yeah, i figured out what i did wrong and got it working now.<br>Had to completely rewrite the code lol.<br><br>Thx for the answer <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 Guest — Tue Sep 28, 2004 5:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-09-28T14:39:29-04:00</updated>

		<published>2004-09-28T14:39:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=41390#p41390</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=41390#p41390"/>
		<title type="html"><![CDATA[Re: Help with fetching info from a dbase]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=41390#p41390"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>set row [mysqlnext $result]</code></pre></div></div></blockquote>don't you mean <div class="codebox"><p>Code: </p><pre><code>set row [mysqlnext $db_handle]</code></pre></div>?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Sep 28, 2004 2:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-09-24T09:37:00-04:00</updated>

		<published>2004-09-24T09:37:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=41181#p41181</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=41181#p41181"/>
		<title type="html"><![CDATA[Help with fetching info from a dbase]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=41181#p41181"><![CDATA[
Hello,<br><br>I been trying to make a tcl script which can fecth info from a vbulletin dbase through a public command. But somehow the information doesnt get relayed to my irc channel.<br><br>This is what the bot says on the partyline:<br><br>[15:14] Userinfo: executing SELECT userid,posts FROM `user` WHERE username='Repec'<br>[15:14] test query19 (just added for testing)<br><br>And this is the script im using:<div class="codebox"><p>Code: </p><pre><code>load /usr/local/lib/tcl8.3/mysqltcl/libmysqltcl.so.2###################################### DATABASE VARIABLES                ######################################set db(host) "localhost"set db(username) "tralala"set db(password) "secret"set db(database) "mydbase"set db(socket) "/var/lib/mysql/mysql.sock"###################################### CONNECT TO DATABASE               ######################################set db_handle [mysqlconnect -host $db(host) -user $db(username) -password $db(password) -db $db(database) -socket $db(socket)]###################################### BINDS                             ######################################bind pub - !user pub_userlookup###################################### CODE STARTS HERE                  ######################################set app(version) "14-8-2004 4:21PM"proc pub_userlookup { nick uhost hand chan text} {  global db_handle  set sUsername [lindex $text 0]    set sql "SELECT userid,posts,Stros,Races,Scans,Hacks,requestsfilled FROM `user` WHERE username='$sUsername'"  putlog "Userinfo: executing $sql"  set result [mysqlquery $db_handle $sql]  putlog "test $result" &lt;-- is just for testing   if {[set row [mysqlnext $result]] != ""} {      set userid [lindex $row 0]      set posts [lindex $row 1]putserv "PRIVMSG $chan: User stats for \002$sUsername\002: \[Posts: $posts \]"  } else {    putserv "PRIVMSG $chan :Couldn't find userinfo"  }  mysqlendquery $result}</code></pre></div>Hope someone can tell me what I did wrong, cuz it seems it does run the query but thats about it.<br><br>Thx in advance<br><br>/Repec<p>Statistics: Posted by Guest — Fri Sep 24, 2004 9:37 am</p><hr />
]]></content>
	</entry>
	</feed>
