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

	<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>2016-03-20T13:20:37-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2016-03-20T13:20:37-04:00</updated>

		<published>2016-03-20T13:20:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104827#p104827</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104827#p104827"/>
		<title type="html"><![CDATA[mysql update]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104827#p104827"><![CDATA[
Yes... forgot to reply here .. NOW() was being counted like a var to<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Sun Mar 20, 2016 1:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2016-03-20T11:23:50-04:00</updated>

		<published>2016-03-20T11:23:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104826#p104826</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104826#p104826"/>
		<title type="html"><![CDATA[mysql update]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104826#p104826"><![CDATA[
Looks to me because you have 17 Columns listed and are trying to insert 18 values.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sun Mar 20, 2016 11:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2016-03-20T04:23:09-04:00</updated>

		<published>2016-03-20T04:23:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104824#p104824</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104824#p104824"/>
		<title type="html"><![CDATA[mysql update]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104824#p104824"><![CDATA[
can anyone help me with a procname for inserting and updating values into a mysql database ?! I have tryed something but it doesnt work.<br><div class="codebox"><p>Code: </p><pre><code>set my(host) "..."set my(user) "...set my(pass) "..."set my(db)   "..."proc mysql:do {nick} {global myset handle [::mysql::connect -host $my(host) -user $my(user) -password $my(pass) -db $my(db)]set check "SELECT player FROM filelist WHERE player = '[::mysql::escape $nick]'"if {[set channel [::mysql::sel $handle $check -list]]!=""} {set do -update} {set do -insert}; putlog "$channel $do"switch -exact -- $do {-insert {set query "INSERT INTO `filelist` (id, laston, player, hostname, daily, weekly, monthly, total, cps, fast, qa, qar, rounds, rpoints, teamp, teamr, teamn) VALUES ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17',NOW())"set result [::mysql::exec $handle $query]if {$result != "1"} {putlog "an error has ocurred with sql: * $result"} {putlog "executing: $query - \00304Ok."}}-update { set query "UPDATE `web_statistics` SET `manager`='[::mysql::escape $my(manager)]', `valid`='$my(valid)', `time`=NOW()  WHERE channel='$channel'"set result [::mysql::exec $handle $query]if {$result != "1"} {putlog "an error has ocurred with sql: * $result"} {putlog "executing: $query - \00304Ok."}}::mysql::close $handle}}</code></pre></div>I encounter errors like<br><br><strong class="text-strong">Tcl error: ::mysql::exec/db server: Column count doesn't match value count at row 1<br></strong><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Sun Mar 20, 2016 4:23 am</p><hr />
]]></content>
	</entry>
	</feed>
