DB IO: prepare pk null fix, split -> explode in Basic

- Basic class still had a "split" call -> change that to explode
- The prepare DB IO part missed setting pk name for the cursor to null
so no returning is assumed
This commit is contained in:
Clemens Schwaighofer
2017-04-03 17:46:06 +09:00
parent 5c53621f96
commit e1255e0872
2 changed files with 6 additions and 2 deletions

View File

@@ -1239,8 +1239,8 @@
return FALSE; return FALSE;
// splits the data up with / or - // splits the data up with / or -
list ($start_year, $start_month, $start_day) = split('[/-]', $start_date); list ($start_year, $start_month, $start_day) = explode('[/-]', $start_date);
list ($end_year, $end_month, $end_day) = split('[/-]', $end_date); list ($end_year, $end_month, $end_day) = explode('[/-]', $end_date);
// check that month & day are two digits and then combine // check that month & day are two digits and then combine
foreach (array('start', 'end') as $prefix) foreach (array('start', 'end') as $prefix)
{ {

View File

@@ -1423,6 +1423,10 @@
$this->prepare_cursor[$stm_name]['returning_id'] = true; $this->prepare_cursor[$stm_name]['returning_id'] = true;
} }
} }
else
{
$this->prepare_cursor[$stm_name]['pk_name'] = $pk_name;
}
} }
// search for $1, $2, in the query and push it into the control array // search for $1, $2, in the query and push it into the control array
preg_match_all('/(\$[0-9]{1,})/', $query, $match); preg_match_all('/(\$[0-9]{1,})/', $query, $match);