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

	<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>2007-03-06T19:38:51-04:00</updated>

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

		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-03-06T19:38:51-04:00</updated>

		<published>2007-03-06T19:38:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71048#p71048</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71048#p71048"/>
		<title type="html"><![CDATA[Need MySql Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71048#p71048"><![CDATA[
Not being an mysql guru, it's hard for me to tell if both of your tables data are in the same var/result. I'm assuming it is not, since you're saying the problem is the var gets the data from table 1, but not table 2 so it sounds like the results from getting table2 data, is clobbering table1's data.. <br><br>In which case, you should get the data from table 1, then use lappend to add that to a new varname, then get the data from table 2, and again use lappend to put the right data into the same varname as the stuff from table 1. THEN you can sort out the bits you want (grabbing it with lindex, of course.)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Tue Mar 06, 2007 7:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Psyfire]]></name></author>
		<updated>2007-03-06T06:20:31-04:00</updated>

		<published>2007-03-06T06:20:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71033#p71033</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71033#p71033"/>
		<title type="html"><![CDATA[Need MySql Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71033#p71033"><![CDATA[
Lindex only grabs the wrong data from the second table... <br>From the first table lindex grabs all data correctly.<br><br>What do I need to change now?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8354">Psyfire</a> — Tue Mar 06, 2007 6:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-03-05T23:58:07-04:00</updated>

		<published>2007-03-05T23:58:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71028#p71028</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71028#p71028"/>
		<title type="html"><![CDATA[Need MySql Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71028#p71028"><![CDATA[
It looks like my suspicion was correct, your lindex's simply do not grab the right fields of data.  Count your output fields correctly and you'll get the right data..  Fields enclosed in {} count as one field.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Mon Mar 05, 2007 11:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Psyfire]]></name></author>
		<updated>2007-03-05T22:09:54-04:00</updated>

		<published>2007-03-05T22:09:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71026#p71026</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71026#p71026"/>
		<title type="html"><![CDATA[Need MySql Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71026#p71026"><![CDATA[
Hello,<br><br>I replaced your line with my line and the result is nothing.<br><br><strong class="text-strong">What happened:</strong><br><br>[03:03:28] &lt;Myrdin&gt; !stats2 Myrdin<br>[03:03:33] &lt;EA-Bot&gt; »» Nickname: <br>[03:03:34] &lt;EA-Bot&gt; »» Skill: <br><br>As you can see it will display nothing. Then I edited the line and added the putcmdlog after the sma qry line. Of course I am logged on into the partyline. The Partyline showed the following things.<br><div class="codebox"><p>Code: </p><pre><code>[03:06:56] &lt;(EA-Bot&gt; [03:01] smaqry '26 Myrdin 1311 26 Myrdin 1151 26 Myrdin 1607 26 Myrdin 1136 26 Myrdin 1371 26 Myrdin 917 26 Myrdin 927 26 Myrdin 859 26 Myrdin 1083 26 Myrdin 1012 26 Myrdin 769 26 Myrdin 889 26 Myrdin 932 26 Myrdin 1127 26 Myrdin 932 26 Myrdin 1004 26 Myrdin 995 26 Myrdin 973 26 Myrdin 988 26 Myrdin 1030 26 Myrdin 897 26 Myrdin 1070 26 Myrdin 1245 26 Myrdin 1000 26 Myrdin 1101 26 Myrdin 1139 26 Myrdin 1457 26 Myrdin 985 26 Myrdin 839 26 Myrdin 882 26 Myrdin 932 26 Myrdin 938 26 Myrdin 703 26 Myr[03:07:26] &lt;(EA-Bot&gt; [03:01] smaqry '9879 {shoot the butmunch} 1311 9879 {shoot the butmunch} 1151 9879 {shoot the butmunch} 1607 9879 {shoot the butmunch} 1136 9879 {shoot the butmunch} 1371 9879 {shoot the butmunch} 917 9879 {shoot the butmunch} 927 9879 {shoot the butmunch} 859 9879 {shoot the butmunch} 1083 9879 {shoot the butmunch} 1012 9879 {shoot the butmunch} 769 9879 {shoot the butmunch} 889 9879 {shoot the butmunch} 932 9879 {shoot the butmunch} 1127 9879 {shoot the butmunch} 932 9879 {shoot the butmunch} </code></pre></div>As you can see, the number 1311 will be shown at my name (Myrdin) and some friend (shoot the butmunch)<br><br>Its the same skill like ever. It only displayed my skill on all other nicknames. It does not work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":-(" title="Sad"><br><br>Edit: If you want, you can join #bla-blubb at quakenet. Just write me and we can test it live together.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8354">Psyfire</a> — Mon Mar 05, 2007 10:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-03-05T14:36:59-04:00</updated>

		<published>2007-03-05T14:36:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71023#p71023</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71023#p71023"/>
		<title type="html"><![CDATA[Need MySql Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71023#p71023"><![CDATA[
And please post the result for set sma(qry)  (maybe 2 examples, to compare the data.)  I suspect when you use lindex, there are spaces in the fields of data, and lindex is getting the wrong items.  You can get the result by putting a <br><br>putcmdlog "smaqry '$sma(qry)'"  <br><br>into your script after the line with set sma(qry)<br><br>If that is the case, where the fields have spaces, you could try using <ul> <li>to create the data line:<br><div class="codebox"><p>Code: </p><pre><code>set sma(qry) [list [mysqlsel $sql(handle) "SELECT hlstats_PlayerNames.playerId,hlstats_PlayerNames.name,hlstats_PlayerNames.lastuse,hlstats_Players.skill,hlstats_PlayerNames.kills,hlstats_PlayerNames.deaths,hlstats_PlayerNames.suicides FROM hlstats_PlayerNames, hlstats_Players WHERE name = '$arg'" -flatlist]]</code></pre></div></li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Mon Mar 05, 2007 2:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Psyfire]]></name></author>
		<updated>2007-03-05T10:10:13-04:00</updated>

		<published>2007-03-05T10:10:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71016#p71016</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71016#p71016"/>
		<title type="html"><![CDATA[Need MySql Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71016#p71016"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc amxx:db:stats {nick host hand chan arg} {global sqlset searchid [lindex $arg 0]if {![string match "*" $searchid]} {putserv "NOTICE $nick :(HLStats) Wrong syntax! - Type: $::hlstats(trigger)stats nickname"return}set sql(handle) [mysqlconnect -host $sql(host) -user $sql(user) -password $sql(pass) -db $sql(db)]set sma(qry) [mysqlsel $sql(handle) "SELECT hlstats_PlayerNames.playerId,hlstats_PlayerNames.name,hlstats_PlayerNames.lastuse,hlstats_Players.skill,hlstats_PlayerNames.kills,hlstats_PlayerNames.deaths,hlstats_PlayerNames.suicides FROM hlstats_PlayerNames, hlstats_Players WHERE name = '$arg'" -flatlist]mysqlclose $sql(handle)if {$sma(qry) != ""} {set gelesen(playerId) [lindex $sma(qry) 0]set gelesen(name) [lindex $sma(qry) 1]set gelesen(lastuse) [lindex $sma(qry) 2]set gelesen(skill) [lindex $sma(qry) 3]set gelesen(kills) [lindex $sma(qry) 4]set gelesen(deaths) [lindex $sma(qry) 5]set gelesen(suicides) [lindex $sma(qry) 6]putserv "PRIVMSG $chan :»» Player ID: $gelesen(playerId)"putserv "PRIVMSG $chan :»» Nickname: $gelesen(name)"putserv "PRIVMSG $chan :»» Last Use: $gelesen(lastuse)"putserv "PRIVMSG $chan :»» Skill: $gelesen(skill)"putserv "PRIVMSG $chan :»» Kills: $gelesen(kills)"putserv "PRIVMSG $chan :»» Deaths: $gelesen(deaths)"putserv "PRIVMSG $chan :»» Suicides: $gelesen(suicides)"} else {putserv "PRIVMSG $chan :$arg not found in HLStats Database ..."}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8354">Psyfire</a> — Mon Mar 05, 2007 10:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-03-05T00:20:57-04:00</updated>

		<published>2007-03-05T00:20:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71010#p71010</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71010#p71010"/>
		<title type="html"><![CDATA[Need MySql Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71010#p71010"><![CDATA[
Post your code.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Mon Mar 05, 2007 12:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Psyfire]]></name></author>
		<updated>2007-03-04T21:19:44-04:00</updated>

		<published>2007-03-04T21:19:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71004#p71004</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71004#p71004"/>
		<title type="html"><![CDATA[Need MySql Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71004#p71004"><![CDATA[
Hello,<br><br>I got a little script where I want to select from 2 tables special fields.<br><div class="codebox"><p>Code: </p><pre><code>"SELECT hlstats_PlayerNames.playerId,hlstats_PlayerNames.name,hlstats_Players.skill FROM hlstats_PlayerNames, hlstats_Players WHERE name = '$arg'"</code></pre></div>I try to explain my problem.<br><br>I want 2 fields from hlstats_PlayerNames and 1 field from hlstats_Players.<br><br>If you watch your stats now via the command in the channel you get the following information for 2 users.<br><br>User1<br>PlayerId = 1<br>Name = Test1<br>Skill = 1500<br><br>User2<br>PlayerId = 2<br>Name = Test2<br>Skill = 1500<br><br>As you can see, the playerId and the name are different, that means it works. But if you look at the skill, you got everytime at every user 1500. I know that is something wrong like I select the skill from the second table hlstats_Players<br><br>But how can I use that it works?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8354">Psyfire</a> — Sun Mar 04, 2007 9:19 pm</p><hr />
]]></content>
	</entry>
	</feed>
