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

	<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>2009-04-05T09:53:23-04:00</updated>

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

		<entry>
		<author><name><![CDATA[raider2k]]></name></author>
		<updated>2009-04-05T09:53:06-04:00</updated>

		<published>2009-04-05T09:53:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88297#p88297</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88297#p88297"/>
		<title type="html"><![CDATA[[SOLVED] adding up values]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88297#p88297"><![CDATA[
oh very fine ^^<br>didnt know that i can add an additional value to incr $var<br><br>and yep - you assumed exactly the right thing, thanks for your help - works fine now <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=9589">raider2k</a> — Sun Apr 05, 2009 9:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-04-05T09:26:39-04:00</updated>

		<published>2009-04-05T09:26:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88296#p88296</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88296#p88296"/>
		<title type="html"><![CDATA[[SOLVED] adding up values]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88296#p88296"><![CDATA[
What kind of database storage are you using?<br>SQL databases usually have neat features for sums and such...<br><br>If you wish to sum it manually, try adapting this piece of code:<div class="codebox"><p>Code: </p><pre><code>set sum 0#Assume the data is stored in dataset as a list of lists...foreach item $dataset { #second item of $item holds the rating... incr sum [lindex item 1]}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Apr 05, 2009 9:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[raider2k]]></name></author>
		<updated>2009-04-05T09:53:23-04:00</updated>

		<published>2009-04-05T07:12:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88294#p88294</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88294#p88294"/>
		<title type="html"><![CDATA[[SOLVED] adding up values]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88294#p88294"><![CDATA[
hi there<br><br>this time im unsure about the way to go with something id like to do - quick example of the case:<br><br>theres a different number of users in a channel where some of them have been added to a database with personal stats. that means the ones who have been added to the database are also being rated by using numbers like one user has been rated with value 10, another one has been rated with value 200 and so on. now i want to sum up all the rated values which gets me somehow stuck.<br><br>usually im reading the values from database and then use foreach to get every value but how do i sum up each value with the value before?<br><br>im not sure if using arrays is a good idea, also played with the idea to write every value into a new line of a text file which will be read line for line and then summed up after the foreach part but im sure theres more beautiful solution to this.<br><br>please help <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=9589">raider2k</a> — Sun Apr 05, 2009 7:12 am</p><hr />
]]></content>
	</entry>
	</feed>
