summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite_statement.c
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2013-02-19 13:28:10 +0100
committerOndřej Surý <ondrej@sury.org>2013-02-19 13:28:10 +0100
commit54098cf044025ec5965b8ea9c84750f9631d85b6 (patch)
treeed0ef32b379c0cdfe20fcafc5b27c4488732fe90 /ext/pdo_sqlite/sqlite_statement.c
parent8572aeb0703107705fc7dde35961cd6a5f89c0c8 (diff)
downloadphp-upstream/5.5.0_alpha4.tar.gz
Imported Upstream version 5.5.0~alpha4upstream/5.5.0_alpha4
Diffstat (limited to 'ext/pdo_sqlite/sqlite_statement.c')
-rw-r--r--ext/pdo_sqlite/sqlite_statement.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c
index d5b4df1fd..e970ad3e0 100644
--- a/ext/pdo_sqlite/sqlite_statement.c
+++ b/ext/pdo_sqlite/sqlite_statement.c
@@ -112,9 +112,15 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d
}
} else {
convert_to_long(param->parameter);
+#if LONG_MAX > 2147483647
+ if (SQLITE_OK == sqlite3_bind_int64(S->stmt, param->paramno + 1, Z_LVAL_P(param->parameter))) {
+ return 1;
+ }
+#else
if (SQLITE_OK == sqlite3_bind_int(S->stmt, param->paramno + 1, Z_LVAL_P(param->parameter))) {
return 1;
}
+#endif
}
pdo_sqlite_error_stmt(stmt);
return 0;