+ st.ResultInt(3,requestindex);\r
+ st.ResultText(4,name);\r
+ st.ResultText(5,pubkey);\r
+\r
+ // if we are already inserting a solution for an identity - we shouldn't show any puzzles that are older than the one we are inserting\r
+ // get the last index # we are inserting this day from this identity\r
+ // if the index here is greater than the index in the st statement, we will skip this puzzle because we are already inserting a puzzle with a greater index\r
+ willshow=true;\r
+ SQLite3DB::Statement st2=m_db->Prepare("SELECT MAX(RequestIndex) FROM tblIdentityIntroductionInserts INNER JOIN tblIntroductionPuzzleRequests ON tblIdentityIntroductionInserts.UUID=tblIntroductionPuzzleRequests.UUID WHERE tblIdentityIntroductionInserts.Day=? AND tblIdentityIntroductionInserts.UUID IN (SELECT UUID FROM tblIntroductionPuzzleRequests WHERE IdentityID=? AND Day=? AND UUID IS NOT NULL) GROUP BY tblIdentityIntroductionInserts.Day;");\r
+ st2.Step();\r
+ if(st2.RowReturned()==true)\r
+ {\r
+ int index=0;\r
+ st2.ResultInt(0,index);\r
+ if(index>=requestindex)\r
+ {\r
+ willshow=false;\r
+ }\r
+ }\r