diff src/c/urweb.c @ 282:0236d9412ad2

Ran a prepared statement with one string parameter
author Adam Chlipala <adamc@hcoop.net>
date Sun, 07 Sep 2008 09:28:13 -0400
parents 7d5860add50f
children c0e4ac23522d
line wrap: on
line diff
--- a/src/c/urweb.c	Thu Sep 04 10:27:21 2008 -0400
+++ b/src/c/urweb.c	Sun Sep 07 09:28:13 2008 -0400
@@ -122,7 +122,7 @@
 
   ctx->inputs[n] = value;
 
-  printf("[%d] %s = %s\n", n, name, value);
+  //printf("[%d] %s = %s\n", n, name, value);
 }
 
 char *lw_get_input(lw_context ctx, int n) {
@@ -130,7 +130,7 @@
     lw_error(ctx, FATAL, "Negative input index %d", n);
   if (n >= lw_inputs_len)
     lw_error(ctx, FATAL, "Out-of-bounds input index %d", n);
-  printf("[%d] = %s\n", n, ctx->inputs[n]);
+  //printf("[%d] = %s\n", n, ctx->inputs[n]);
   return ctx->inputs[n];
 }
 
@@ -656,3 +656,13 @@
   else
     return "TRUE";
 }
+
+char *lw_Basis_ensqlBool(lw_Basis_bool b) {
+  static lw_Basis_int true = 1;
+  static lw_Basis_int false = 0;
+
+  if (b == lw_Basis_False)
+    return (char *)&false;
+  else
+    return (char *)&true;
+}