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 cd8cf79 commit 2153eb7
Showing 1 changed file with 28 additions and 8 deletions.
36 changes: 28 additions & 8 deletions admin/models/player.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,36 @@ function importupload($post = array())

Factory::getApplication()->enqueueMessage(Text::_(__METHOD__.' '.__LINE__.' players_upload <pre>'.print_r($players_upload,true).'</pre>' ), '');

foreach ( $players_upload as $key => $value) if ( $key > 0 )
{
//for($a=1; $a < sizeof($players_upload); $a++ )
//{
$this->jsmquery->clear();
$this->jsmquery->select('id');
$this->jsmquery->from('#__sportsmanagement_person');
$this->jsmquery->where('firstname ' . $this->jsmdb->Quote('' . $value->firstname . '') );
$this->jsmquery->where('lastname ' . $this->jsmdb->Quote('' . $value->lastname . '') );
$this->jsmquery->where('birthday ' . $this->jsmdb->Quote('' . $value->birthday . '') );
$this->jsmquery->where('country ' . $this->jsmdb->Quote('' . $value->country . '') );

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

if ( !$res )
{
$profile = new stdClass;
$profile->firstname = $value->firstname;
$profile->lastname = $value->lastname;
$profile->birthday = $value->birthday;
$profile->alias = $value->alias;
$profile->knvbnr = $value->knvbnr;
$profile->gender = $value->gender;
$profile->country = $value->country;

$insertresult = $this->jsmdb->insertObject('#__sportsmanagement_person', $profile);
}










}



Expand Down

0 comments on commit 2153eb7

Please sign in to comment.