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

	<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>2012-05-04T20:53:49-04:00</updated>

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

		<entry>
		<author><name><![CDATA[keung]]></name></author>
		<updated>2012-05-04T20:53:49-04:00</updated>

		<published>2012-05-04T20:53:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99344#p99344</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99344#p99344"/>
		<title type="html"><![CDATA[Question regarding mysqltcl and moreresult]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99344#p99344"><![CDATA[
As I haven't been able to track down a more suitable forum for this API, I hope it's okay that I ask this here.<br><br>I have been playing around abit lately with the mysqltcl API, but I've stumbled upon something that I do not understand. From what I can gather from <a href="http://www.xdobry.de/mysqltcl/mysqltcl.html#27" class="postlink">the manual</a> and <a href="http://forum.egghelp.org/viewtopic.php?p=97942#97942" class="postlink">this example</a>, using mysql::moreresult should return true if there are more data available from a SELECT statement. This is the code I'm running:<br><div class="codebox"><p>Code: </p><pre><code>set sqlLink [::mysql::connect -host $sqlHostname -user $sqlUsername -password $sqlPassword -db $sqlDatabase]set sql "SELECT * FROM tcltest"set query [::mysql::query $sqlLink $sql]puts "moreresult: [::mysql::moreresult $query]"if {[::mysql::moreresult $query]} {        puts [::mysql::fetch $query]        puts [::mysql::fetch $query]        puts [::mysql::fetch $query]}</code></pre></div>I know that the test table only holds three rows, which is why I've conveniently lined up three fetch's in a row. But, the thing is, this does not have the outcome I expect. This is what I get when I run the tcl:<br><div class="codebox"><p>Code: </p><pre><code>keung@coeus:~/tcl$ ./mysql.tclmoreresult: 0</code></pre></div>Now, if I remove the if-statement completely, this is the result:<br><div class="codebox"><p>Code: </p><pre><code>keung@coeus:~/tcl$ ./mysql.tclmoreresult: 01 keung gnuek ungke2 bla inst prep3 eon pondus m</code></pre></div>Does anyone know what I am doing wrong?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11983">keung</a> — Fri May 04, 2012 8:53 pm</p><hr />
]]></content>
	</entry>
	</feed>
