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

	<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-11T02:36:48-04:00</updated>

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

		<entry>
		<author><name><![CDATA[err0r]]></name></author>
		<updated>2012-05-11T02:36:48-04:00</updated>

		<published>2012-05-11T02:36:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99379#p99379</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99379#p99379"/>
		<title type="html"><![CDATA[If data exists , skip adding data]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99379#p99379"><![CDATA[
moreresult produces errors using mysql.mod <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11976">err0r</a> — Fri May 11, 2012 2:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-05-11T00:21:26-04:00</updated>

		<published>2012-05-11T00:21:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99377#p99377</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99377#p99377"/>
		<title type="html"><![CDATA[If data exists , skip adding data]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99377#p99377"><![CDATA[
You can use:<div class="codebox"><p>Code: </p><pre><code>if {![::mysql::moreresult $result]} {# insert code}</code></pre></div>After each query don't forget to end it with <em class="text-italics">mysql::endquery</em>.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri May 11, 2012 12:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[err0r]]></name></author>
		<updated>2012-05-10T17:25:36-04:00</updated>

		<published>2012-05-10T17:25:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99376#p99376</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99376#p99376"/>
		<title type="html"><![CDATA[If data exists , skip adding data]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99376#p99376"><![CDATA[
Below is the Proc that i use...<br>It takes the data from a line of text, selects the data in a mysql query.<br>That works fine, but what i would like is, if the data exists in the database, the data is not added again.<br>I have tried many things but it fails<br><br>any suggestions please ?<br><div class="codebox"><p>Code: </p><pre><code>proc check123 { nick host hand chan text} {set text [split $text]set nickname [lindex $text 1]scan [string trim [lindex $text 2] {(),}] {%[^@]@%s} ident ispset ip [string trim [lindex $text 4] {[]}] putquick  " PRIVMSG #security NickName:\00304$nickname \00301Ident:\00304$ident \00301ISP:\00304$isp \00301User IP:\00304$ip" set result [mysql_query "SELECT nickname , ident , isp , ip  FROM checklist where ip = '$ip' limit 6"]putquick "PRIVMSG #security :Matches For the IP (Please Note Some IPS are Dynamic) :"foreach item $result {putquick "PRIVMSG #security :Record: [join $item ", "]"}mysql_query "INSERT INTO `checklist` ( nickname , ident , isp , ip  ) VALUES ( '[mysql_escape $nickname]' , '[mysql_escape $ident]' , '[mysql_escape $isp]' , '[mysql_escape $ip]')"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11976">err0r</a> — Thu May 10, 2012 5:25 pm</p><hr />
]]></content>
	</entry>
	</feed>
