<?php
include_once("c_events_opo_card_db.php");
class c_page_cab_events_opo_card_db_pass extends c_page_cab_events_opo_card_db
{
  public $h1='Дамп записей участия в мероприятии [obj_site_events_pass]' ;
  function block_main()
  { $this->page_title() ;
	?><h2>obj_site_events_pass:</h2><?
    $cnt=execSQL_value('select count(pkey) from obj_site_events_pass where event_id='.$this->rec_event['pkey']) ;
    echo 'Всего записей: <strong>'.$cnt.'</strong><br>' ;
    $recs=execSQL_row('select personal_id,count(pkey) as cnt from obj_site_events_pass where event_id='.$this->rec_event['pkey'].' group by personal_id having cnt>1') ;
    echo '<strong>Дубликаты по personal_id</strong><br>' ;
    damp_array($recs,1,-1);
    echo '<strong>Последние 100 записей</strong><br>' ;
	$recs=execSQL('select * from obj_site_events_pass where event_id='.$this->rec_event['pkey'].' order by pkey desc limit 100') ;
	print_2x_arr($recs) ;


	//execSQL_update('delete from obj_site_events_pass where event_id='.$this->rec_event['pkey']) ;
	//execSQL_update('delete from obj_site_events_pass where pkey=84734') ;
  }


}



?>
