Skip to content

Commit

Permalink
joomla 4
Browse files Browse the repository at this point in the history
  • Loading branch information
diddipoeler committed Mar 19, 2023
1 parent 6919997 commit 28ab0e8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions admin/models/player.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function importupload($post = array())
$this->jsmquery->where('lastname like ' . $this->jsmdb->Quote('' . $value->lastname . '') );
$this->jsmquery->where('birthday like ' . $this->jsmdb->Quote('' . $value->birthday . '') );
$this->jsmquery->where('country like ' . $this->jsmdb->Quote('' . $value->country . '') );

$this->jsmdb->setQuery($this->jsmquery );
$res = $this->jsmdb->loadResult();

if ( !$res )
Expand All @@ -173,8 +173,17 @@ function importupload($post = array())
$profile->knvbnr = $value->knvbnr;
$profile->gender = $value->gender;
$profile->country = $value->country;

$insertresult = $this->jsmdb->insertObject('#__sportsmanagement_person', $profile);
try
{
$insertresult = $this->jsmdb->insertObject('#__sportsmanagement_person', $profile);
}
catch (Exception $e)
{
$this->jsmapp->enqueueMessage(Text::sprintf('COM_SPORTSMANAGEMENT_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()), 'error');
$this->jsmapp->enqueueMessage(Text::sprintf('COM_SPORTSMANAGEMENT_FILE_ERROR_FUNCTION_FAILED', __FILE__, __LINE__), 'error');

}

}


Expand Down

0 comments on commit 28ab0e8

Please sign in to comment.