Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
<div><br></div><div>Thanks,</div><div><br></div><div>Aleksander</div></div>=
<div class=3D"HOEnZb"><div class=3D"h5"><div class=3D"gmail_extra"><br><br>=
<div class=3D"gmail_quote">On Thu, Mar 7, 2013 at 3:28 AM, Nicolas Deroche =
<span dir=3D"ltr">&lt;<a href=3D"mailto:***@gmail.com" target=3D"_bla=
nk">***@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr">I did soci::use(map_id), bu=
t i&#39;m not saving this field, just setting a clause on it.<div>But I nev=
er checked if this could be the error, I&#39;ll do that when i&#39;m back f=
rom work.</div>


<div>
<br></div><div>I just hope it&#39;s something else, it&#39;d really be a sh=
ame if it was that..</div><div><br></div><div>thanks</div></div><div><div><=
div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">

2013/3/7 Wacha G=E1bor <span dir=3D"ltr">&lt;<a href=3D"mailto:***@mit.bm=
e.hu" target=3D"_blank">***@mit.bme.hu</a>&gt;</span><br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
=20
=20
=20
<div text=3D"#000000" bgcolor=3D"#FFFFFF">
<div>Hello,<br>
<br>
I am new in using soci, but haven&#39;t you forgotten
soic::into(map_id)?<br>
<br>
You&#39;ve selected map_id, but there is nothing to put that into.<br=
<br>
Gabor<br>
<br>
<br>
2013-03-07 09:14 keltez=E9ssel, Nicolas Deroche =EDrta:<br>
</div>
<blockquote type=3D"cite"><div><div>
=20
Hello ! <br>
I&#39;m fetching a list using statements, here&#39;s the code:<br>
<br>
<font color=3D"#999999"><small><i>=A0=A0=A0=A0=A0=A0=A0 game::portal_=
id_t p_id,
p_t2, ptype =3D 0;</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0 game::map_id_t p_t, px, py, pfx, pfy=
;</i><i><br>
</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0 soci::statement subst2 =3D</i><i><br=
</i><i>=A0=A0=A0=A0=A0=A0=A0 (sql.prepare &lt;&lt; &quot;SELECT &=
quot;</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0 &lt;&lt; &quot;`id`, `map_id`,`x`, `y`,
`type`, `target`, `target2`, `forcex`, `forcey` &quot;</i><i><b=
r>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0 &lt;&lt; &quot;FROM `pack_maps_portals`
&quot;</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0 &lt;&lt; &quot;WHERE `map_id`=3D:map_id &quot;</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0 &lt;&lt; &quot;ORDER BY `id` ASC&quot;,</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0 soci::into(p_id),</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0 soci::into(px),</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0 soci::into(py),</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0 soci::into(ptype),</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0 soci::into(p_t),</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0 soci::into(p_t2),</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0 soci::into(pfx),</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0 soci::into(pfy),</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0 soci::use(map_id));</i><i><br>
</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0 subst2.execute();</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0 while(subst2.fetch())</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0 {</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 std::cout &lt;&lt; &q=
uot;PORTAL: mapid &quot;
&lt;&lt; map_id &lt;&lt; &quot; portal_id:&quot; &lt;&lt; p_id
&lt;&lt; &quot;, type: &quot; &lt;&lt; ptype &lt;&lt; &quot;- x=
:&quot; &lt;&lt;
px &lt;&lt; &quot;- y;&quot; &lt;&lt; py</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &lt;&lt; &quot;; map=
=3D&quot; &lt;&lt; p_t &lt;&lt; &quot;
portal=3D&quot; &lt;&lt; p_t2 &lt;&lt; std::endl;</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 map_ps.insert({p_id,<=
/i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 new
game::Portal(px,py,p_id,0,ptype,p_t,p_t2,pfx,pfy)});</i><i><br>
</i><i>=A0=A0=A0=A0=A0=A0=A0=A0 }</i></small></font><br>
<br>
The thing is that, the value of &quot;ptype&quot; is into &quot;px&qu=
ot; and &quot;px&quot; into
&quot;ptype&quot;.<br>
Same for p_t and p_t2, they are swapped aswell.<br>
<br>
And it certainly disturbs me to swap the soci::into(...) lines
because it does not match the correct field order in the SQL
statement ...<br>
<br>
How can I fix that?<br>
Thanks, nico<br>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>----------------------------------------------------=
--------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester =20
Wave(TM): Endpoint Security, Q1 2013 and &quot;remains a good choice&quot; =
in the =20
endpoint security space. For insight on selecting the right partner to=20
tackle endpoint security challenges, access the full report.=20
<a href=3D"http://p.sf.net/sfu/symantec-dev2dev" target=3D"_blank">http://p=
.sf.net/sfu/symantec-dev2dev</a></pre>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
soci-users mailing list
<a href=3D"mailto:soci-***@lists.sourceforge.net" target=3D"_blank">soci-=
***@lists.sourceforge.net</a>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/soci-users" target=
=3D"_blank">https://lists.sourceforge.net/lists/listinfo/soci-users</a><spa=
n><font color=3D"#888888">
</font></span></pre><span><font color=3D"#888888">
</font></span></blockquote><span><font color=3D"#888888">
<br>
<br>
<pre cols=3D"72">--=20
=DCdv=F6zlettel,
Wacha G=E1bor</pre>
</font></span></div>

<br>-----------------------------------------------------------------------=
-------<br>
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester<br>
Wave(TM): Endpoint Security, Q1 2013 and &quot;remains a good choice&quot; =
in the<br>
endpoint security space. For insight on selecting the right partner to<br>
tackle endpoint security challenges, access the full report.<br>
<a href=3D"http://p.sf.net/sfu/symantec-dev2dev" target=3D"_blank">http://p=
.sf.net/sfu/symantec-dev2dev</a><br>_______________________________________=
________<br>
soci-users mailing list<br>
<a href=3D"mailto:soci-***@lists.sourceforge.net" target=3D"_blank">soci-=
***@lists.sourceforge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/soci-users" target=
=3D"_blank">https://lists.sourceforge.net/lists/listinfo/soci-users</a><br>
<br></blockquote></div><br></div>
</div></div><br>-----------------------------------------------------------=
-------------------<br>
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester<br>
Wave(TM): Endpoint Security, Q1 2013 and &quot;remains a good choice&quot; =
in the<br>
endpoint security space. For insight on selecting the right partner to<br>
tackle endpoint security challenges, access the full report.<br>
<a href=3D"http://p.sf.net/sfu/symantec-dev2dev" target=3D"_blank">http://p=
.sf.net/sfu/symantec-dev2dev</a><br>_______________________________________=
________<br>
soci-users mailing list<br>
<a href=3D"mailto:soci-***@lists.sourceforge.net" target=3D"_blank">soci-=
***@lists.sourceforge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/soci-users" target=
=3D"_blank">https://lists.sourceforge.net/lists/listinfo/soci-users</a><br>
<br></blockquote></div><br></div>
</div></div><br>-----------------------------------------------------------=
-------------------<br>
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester<br>
Wave(TM): Endpoint Security, Q1 2013 and &quot;remains a good choice&quot; =
in the<br>
endpoint security space. For insight on selecting the right partner to<br>
tackle endpoint security challenges, access the full report.<br>
<a href=3D"http://p.sf.net/sfu/symantec-dev2dev" target=3D"_blank">http://p=
.sf.net/sfu/symantec-dev2dev</a><br>_______________________________________=
________<br>
soci-users mailing list<br>
<a href=3D"mailto:soci-***@lists.sourceforge.net">soci-***@lists.source=
forge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/soci-users" target=
=3D"_blank">https://lists.sourceforge.net/lists/listinfo/soci-users</a><br>
<br></blockquote></div><br></div>

--e89a8f3bb0679aa0a704d7599713--

Loading...