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

	<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>2002-09-29T12:34:25-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-09-29T12:34:25-04:00</updated>

		<published>2002-09-29T12:34:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11498#p11498</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11498#p11498"/>
		<title type="html"><![CDATA[sql and special chars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11498#p11498"><![CDATA[
The moral of this story, is to read the documentation.<br><br>All Tcl documentation, states what a command will return. IE, string, list, multiple dimentional list.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sun Sep 29, 2002 12:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[slashem]]></name></author>
		<updated>2002-09-29T08:11:26-04:00</updated>

		<published>2002-09-29T08:11:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11486#p11486</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11486#p11486"/>
		<title type="html"><![CDATA[sql and special chars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11486#p11486"><![CDATA[
ok, found the function<br>had to use [mysqlescape $variable] .. but now a new problem has arisen :/<br><br>when I retrieve the text I put in the sql db back I get it like {he's bla bla bla bla} as a string.. with those {}  :/<br>how can I msg that to a person without those {} ?<br><br>----<br>Hmm, I was trying some more stuff and apparantly found it:)<br>set something [mysqlnext $db]<br>[lindex $something 0] &lt;- got me what I needed<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1742">slashem</a> — Sun Sep 29, 2002 8:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-09-29T07:28:12-04:00</updated>

		<published>2002-09-29T07:28:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11485#p11485</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11485#p11485"/>
		<title type="html"><![CDATA[sql and special chars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11485#p11485"><![CDATA[
Read the package documentation.<br><br>There should be a command prvided, that will excape any characters for you, so that the message is designed to be sent to a MySQL server.<br><br>In this situation, only the $message variable should be passed throuhg this function.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sun Sep 29, 2002 7:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[slashem]]></name></author>
		<updated>2002-09-29T07:22:30-04:00</updated>

		<published>2002-09-29T07:22:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11483#p11483</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11483#p11483"/>
		<title type="html"><![CDATA[sql and special chars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11483#p11483"><![CDATA[
I'm using some tcl-mysql package (mysqltcl)<br><br>which funtion for escaping characters are you pointing to ?<br><br>the only code that generates the error is<br>"insert into msgs ( msgcontents ) values ('$message')"  because $message contains words with a ' in it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1742">slashem</a> — Sun Sep 29, 2002 7:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-09-29T07:11:52-04:00</updated>

		<published>2002-09-29T07:11:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11478#p11478</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11478#p11478"/>
		<title type="html"><![CDATA[sql and special chars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11478#p11478"><![CDATA[
This all depends on the MySQL interface you are using.<br><br>Are you using a MySQL library for Tcl, or writting to a file, and sending it to the MySQL application?<br><br>Using a Tcl package is by far the most simple, and the best way about creating a fix. To do so, you should use the function provided, for escaping caracters.<br><br>For writting to a file (or direct to stdin on the mysql app), it would all depend how you handled the incoming text.<br><br>First, follow the rules for  lists, as defined in the FAQ entry on the forum. If you can't work out how, you should paste the script, that is haviong trouble, and we can give pointers.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sun Sep 29, 2002 7:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[slashem]]></name></author>
		<updated>2002-09-29T05:41:42-04:00</updated>

		<published>2002-09-29T05:41:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11477#p11477</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11477#p11477"/>
		<title type="html"><![CDATA[sql and special chars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11477#p11477"><![CDATA[
I'm making some kind of !msg bot where members can use !msg &lt;username&gt; &lt;message_text&gt; to send msg's to offline users and when the users join the channel they'll get there message..<br><br>I'm having a problem with adding messages that contain special characters to the mysql database...<br><br>"insert into msgs ( msgcontents ) values ('$message')" doesn't work when theres's a word like " he's " or  " it's " in the $message ..<br><br>anyone know how to work around this so that those words with special chars can get added and retrieved normally ?<br><br>thx in advance <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=1742">slashem</a> — Sun Sep 29, 2002 5:41 am</p><hr />
]]></content>
	</entry>
	</feed>
