gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r37216 - gnunet/src/my


From: gnunet
Subject: [GNUnet-SVN] r37216 - gnunet/src/my
Date: Mon, 30 May 2016 18:19:14 +0200

Author: christophe.genevey
Date: 2016-05-30 18:19:14 +0200 (Mon, 30 May 2016)
New Revision: 37216

Modified:
   gnunet/src/my/test_my.c
Log:
fix select request

Modified: gnunet/src/my/test_my.c
===================================================================
--- gnunet/src/my/test_my.c     2016-05-30 16:08:03 UTC (rev 37215)
+++ gnunet/src/my/test_my.c     2016-05-30 16:19:14 UTC (rev 37216)
@@ -47,8 +47,8 @@
      uint32_t u32;
      uint64_t u64;
 
-     struct GNUNET_MYSQL_StatementHandle *statements_handle_insert;
-//     struct GNUNET_MYSQL_StatementHandle *statements_handle_select;
+//     struct GNUNET_MYSQL_StatementHandle *statements_handle_insert;
+     struct GNUNET_MYSQL_StatementHandle *statements_handle_select;
 
      struct GNUNET_CRYPTO_RsaPrivateKey *priv;
      struct GNUNET_HashCode hmsg;
@@ -62,6 +62,7 @@
      u32 = 32;
      u64 = 64;
 
+/*   FIXE THE INSERT QUERY  
      statements_handle_insert = GNUNET_MYSQL_statement_prepare (context,
                                         "INSERT INTO test_my ("
                                         " pub"
@@ -74,8 +75,8 @@
                                         ",u32"
                                         ",u64"
                                         ") VALUES "
-                                        "($1, $2, $3, $4, $5, $6,"
-                                        "$7, $8, $9)");
+                                        "(@1, @2, @3, @4, @5, @6,"
+                                        "@7, @8, @9);");
 
      if (NULL == statements_handle_insert)
      {
@@ -101,10 +102,12 @@
                                              statements_handle_insert,
                                              params_insert))
      {
-          fprintf (stderr, "Failed to execute prepared statement\n");
+          fprintf (stderr, 
+                    "Failed to execute prepared statement\n");
           return 22;
      }
-/*     statements_handle_select = GNUNET_MYSQL_statement_prepare (context,
+*/
+     statements_handle_select = GNUNET_MYSQL_statement_prepare (context,
                                                                  "SELECT"
                                                                  " pub"
                                                                  ",sig"
@@ -136,7 +139,7 @@
           fprintf (stderr, "Failed to execute prepared statement\n");
           return 22;
      }
-*/
+
      return 0;
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]