Permalink
Browse files

removed php_max_int because its about database not about php.

  • Loading branch information...
1 parent 913ae2a commit f6624da60ff7f569d42bd7d1c19055c63131d438 = committed Mar 31, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 RedBean/Driver/PDO.php
View
@@ -146,7 +146,7 @@ protected function bindParams($s,$aValues) {
if (is_null($value)){
$s->bindValue($key+1,null,PDO::PARAM_NULL);
}
- elseif (!$this->flagUseStringOnlyBinding && RedBean_QueryWriter_AQueryWriter::canBeTreatedAsInt($value) && $value <= PHP_INT_MAX) {
+ elseif (!$this->flagUseStringOnlyBinding && RedBean_QueryWriter_AQueryWriter::canBeTreatedAsInt($value) && $value < 2147483648) {
$s->bindParam($key+1,$value,PDO::PARAM_INT);
}
else {
@@ -157,7 +157,7 @@ protected function bindParams($s,$aValues) {
if (is_null($value)){
$s->bindValue($key,null,PDO::PARAM_NULL);
}
- elseif (!$this->flagUseStringOnlyBinding && RedBean_QueryWriter_AQueryWriter::canBeTreatedAsInt($value) && $value <= PHP_INT_MAX) {
+ elseif (!$this->flagUseStringOnlyBinding && RedBean_QueryWriter_AQueryWriter::canBeTreatedAsInt($value) && $value < 2147483648) {
$s->bindParam($key,$value,PDO::PARAM_INT);
}
else {

1 comment on commit f6624da

Contributor

damianb commented on f6624da Mar 31, 2012

oh, so it is about the database's limitations, and not about PHP's own?

Please sign in to comment.