mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-23 23:56:15 +00:00
Fix #180
This commit is contained in:
parent
d3c3b6ed00
commit
d169f9c331
1 changed files with 3 additions and 3 deletions
|
@ -121,10 +121,10 @@ class DBLayer {
|
|||
* @param $data the parameters that are being inserted into table.
|
||||
* @return returns the id of the last inserted element.
|
||||
*/
|
||||
public function executeReturnId( $tb_name, $data ) {
|
||||
public function executeReturnId( $tb_name, $data, $datafunc = array() ) {
|
||||
$this->useDb();
|
||||
$field_values = ':' . implode( ',:', array_keys( $data ) );
|
||||
$field_options = implode( ',', array_keys( $data ) );
|
||||
$field_options = implode(',', array_merge(array_keys($data), array_keys($datafunc)));
|
||||
$field_values = implode(',', array_merge(array(':' . implode(',:', array_keys($data))), array_values($datafunc)));
|
||||
try {
|
||||
$sth = $this -> PDO -> prepare( "INSERT INTO $tb_name ($field_options) VALUE ($field_values)" );
|
||||
foreach ( $data as $key => $value )
|
||||
|
|
Loading…
Reference in a new issue