Yes, the full error message is the following:<br>
<br>
&quot; ProgrammingError: (1064, &quot;You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right
syntax to use near '0\n)' at line 9&quot;) &quot;<br>
<br>
Here is the select portion of the query I am running:<br>
<br>
select count(*) as &quot;order&quot;<br><br><div><span class="gmail_quote">On 11/12/05, <b class="gmail_sendername">Peter Bengtsson</b> &lt;<a href="mailto:peter@fry-it.com">peter@fry-it.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
What kind of a strange message is that?<br>&quot;MySQL server version for the right syntax to use near '0\n)'&quot;<br>Is that the ErrorValue?<br><br>It can't be converted to a long or in because it contains a ) not<br>because of the \n
<br>What's the SQL you're trying to use? (Only need to see the SELECT ... part)<br><br>On 11/11/05, Ivan Stout &lt;<a href="mailto:aibanhamano@gmail.com">aibanhamano@gmail.com</a>&gt; wrote:<br>&gt; Peter,<br>&gt;<br>&gt;&nbsp;&nbsp;Thank you, but unfortunately I still get the same error due to the newline
<br>&gt; character being there and still cannot remove it with variable.replace. Can<br>&gt; a &quot;long object&quot; be converted to a string or integer some way?<br>&gt;<br>&gt;<br>&gt;<br>&gt; On 11/12/05, Peter Bengtsson &lt;
<a href="mailto:peter@fry-it.com">peter@fry-it.com</a>&gt; wrote:<br>&gt; &gt; On 11/11/05, Ivan Stout &lt;<a href="mailto:aibanhamano@gmail.com">aibanhamano@gmail.com</a>&gt; wrote:<br>&gt; &gt; &gt; Greetings,<br>&gt; &gt; &gt;
<br>&gt; &gt; &gt;&nbsp;&nbsp;I would like to insert the results of a query into another table and am<br>&gt; &gt; &gt; doing this from a python script. I am setting the results of a<br>&gt; queryequal to<br>&gt; &gt; &gt; a variable with the following:
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;variable = container.zsql_method(paramater=value)[0][0]<br>&gt; &gt;<br>&gt; &gt; Try getting the field out by name, not number.<br>&gt; &gt; Eg:<br>&gt; &gt; variable = container.zsql_method
(paramater=value)[0]['count']<br>&gt; &gt; or<br>&gt; &gt; variable = container.zsql_method(paramater=value)[0]['age']<br>&gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;This gives the results I want (in this case &quot;0&quot;), but when I try to
<br>&gt; insert<br>&gt; &gt; &gt; this variable using another zsql method, I get the following error:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&quot;MySQL server version for the right syntax to use near '0\n)'&quot;<br>&gt; &gt; &gt;
<br>&gt; &gt; &gt;&nbsp;&nbsp;The value I want is there, but it has a newline character also. I try<br>&gt; &gt; &gt; removing using .replace but then I get the following error:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;'long' object has no attribute 'replace'
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;I would greatly appreciate it if someone could point me in the right<br>&gt; &gt; &gt; direction.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;Than you very much,<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;Ivan
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; _______________________________________________<br>&gt; &gt; &gt; Zope maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Zope@zope.org">Zope@zope.org</a><br>&gt; &gt; &gt; <a href="http://mail.zope.org/mailman/listinfo/zope">
http://mail.zope.org/mailman/listinfo/zope</a><br>&gt; &gt; &gt; **&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**<br>&gt; &gt; &gt; (Related lists -<br>&gt; &gt; &gt;&nbsp;&nbsp;<a href="http://mail.zope.org/mailman/listinfo/zope-announce">
http://mail.zope.org/mailman/listinfo/zope-announce</a><br>&gt; &gt; &gt;&nbsp;&nbsp; <a href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;
<br>&gt; &gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; --<br>&gt; &gt; Peter Bengtsson,<br>&gt; &gt; work <a href="http://www.fry-it.com">www.fry-it.com</a><br>&gt; &gt; home <a href="http://www.peterbe.com">www.peterbe.com
</a><br>&gt; &gt; hobby <a href="http://www.issuetrackerproduct.com">www.issuetrackerproduct.com</a><br>&gt; &gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; Zope maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Zope@zope.org">
Zope@zope.org</a><br>&gt; <a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a><br>&gt; **&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**<br>&gt; (Related lists -<br>&gt;&nbsp;&nbsp;<a href="http://mail.zope.org/mailman/listinfo/zope-announce">
http://mail.zope.org/mailman/listinfo/zope-announce</a><br>&gt;&nbsp;&nbsp;<a href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br>&gt;<br>&gt;<br>&gt;<br><br><br>--<br>Peter Bengtsson,
<br>work <a href="http://www.fry-it.com">www.fry-it.com</a><br>home <a href="http://www.peterbe.com">www.peterbe.com</a><br>hobby <a href="http://www.issuetrackerproduct.com">www.issuetrackerproduct.com</a><br></blockquote>
</div><br>