diff --git a/core/a/mysql.db.php b/core/a/mysql.db.php index 0631350..d8eb0da 100644 --- a/core/a/mysql.db.php +++ b/core/a/mysql.db.php @@ -151,10 +151,11 @@ abstract class Db implements IDb * @param bool $wherevalue * @param bool $rowfield * @param bool $rowvalue + * @return bool */ - public function updateRowByFieldWhere( $wherefield = false, $wherevalue = false, $rowfield = false, $rowvalue = false ) + public function updateRowByFieldWhere( $wherefield = false, $wherevalue = false, $rowfield = false, $rowvalue = false ): bool { - Pdo::updateColumnByFieldWhere( self::$table['table'], $rowfield, $rowvalue, $wherefield, $wherevalue ); + return Pdo::updateColumnByFieldWhere( self::$table['table'], $rowfield, $rowvalue, $wherefield, $wherevalue ); } /** diff --git a/core/c/pdo.php b/core/c/pdo.php index 511c764..3223bab 100755 --- a/core/c/pdo.php +++ b/core/c/pdo.php @@ -166,19 +166,20 @@ final class pdo extends Mysql implements IPdo * @param string $parameter_name * @param string $field_name * @param string $where_value + * @return bool */ public static function updateColumnByFieldWhere( $tablename = self::PLACE_TABLE_NAME, $column_name = IMysql::PLACE_COLUMN_NAME, $parameter_name = IMysql::PLACE_SEARCH_TERM, $field_name = IMysql::PLACE_FIELD_NAME, - $where_value = IMysql::PLACE_WHERE_VALUE ) + $where_value = IMysql::PLACE_WHERE_VALUE ): bool { $statement = parent::getInstance( self::getSettingsSection() )->getConn(); $query = "UPDATE " . $tablename . " SET " . $column_name . " = :" . $column_name . " WHERE " . $field_name . " = :". $field_name; $insert = $statement->prepare($query); $insert->bindParam( ':'.$column_name, $parameter_name ); $insert->bindParam( ':'.$field_name, $where_value ); - $insert->execute(); + return $insert->execute(); } /**