summaryrefslogtreecommitdiff
path: root/src/c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-09-07 09:28:13 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-09-07 09:28:13 -0400
commit1777fbbddce252990fc5055e4e5462123938483c (patch)
treed38bcc3f03b117015ed1691f79c921acf1651bfa /src/c
parent711796ea5b4bf5d36b644eafa1b198ed3e4e1798 (diff)
Ran a prepared statement with one string parameter
Diffstat (limited to 'src/c')
-rw-r--r--src/c/urweb.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index c37393f2..6f54e1a7 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -122,7 +122,7 @@ void lw_set_input(lw_context ctx, char *name, char *value) {
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 @@ char *lw_get_input(lw_context ctx, int n) {
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 @@ char *lw_Basis_sqlifyBool(lw_context ctx, lw_Basis_bool b) {
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;
+}