<p>I have a database with lots of null values. Because of this I'm using the technique of passing them all as string pointers, as described in the docs. <a href="http://pastebin.com/S1y0RT8g" rel="nofollow">SAMPLE CODE</a></p>
<p>I wrote some queries and used fmt.Sprintf to build some queries. After some refactoring to substitute that code for prepared statements, my types all became their actual database types and I'm getting error messages like: "type is int64, not string".</p>
<p>I already went back to using Sprintf. It's a small project and my vars are not user input, so not really a problem. But I'd really like to know what's going on, because I'm investing in becoming a Go dev in the long run.</p>
<hr/>**评论:**<br/><br/>Ploobers: <pre><p>Show us your actual query. Prepared statements work great, so I'm sure you just have a syntax error.</p></pre>palitones: <pre><p>Here you go. Thanks for the help!</p>
<p><a href="http://pastebin.com/143AJJW1" rel="nofollow">http://pastebin.com/143AJJW1</a></p></pre>Ploobers: <pre><p>I'm assuming that in your code, there's a closing " in the prepared statement version. If not and it somehow compiled, that could cause weird issues.</p>
<p>What field type is <code>t2.date_referenced</code>? DATETIME? TIMESTAMP?</p></pre>
