AlaK4X
Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64



Your IP : 3.145.88.241


Current Path : /var/www/lhjmq-records.qc.ca/public_html/administration/lib/
Upload File :
Current File : /var/www/lhjmq-records.qc.ca/public_html/administration/lib/arenas.php

<?php
function arena_get_data($mysql_link, $id_arena){
	if(is_array($id_arena) && count($id_arena) > 0){
		$res = mysql_query('SELECT * FROM arenas AS a WHERE id_arena IN ('.implode(', ', $id_arena).')', $mysql_link);
	}else{
		$res = mysql_query('SELECT * FROM arenas AS a WHERE id_arena = "'.$id_arena.'"', $mysql_link);
	}
	$data = array();
	while($row = mysql_fetch_assoc($res)){
		$data[$row['id_arena']] = $row;
	}
	return $data;
}

function arena_valid_id($mysql_link, $id){
	$arenas_res = mysql_query('SELECT id_arena FROM arenas WHERE id_arena = "'.$id.'"', $mysql_link);
	if(mysql_num_rows($arenas_res)>0){
		return true;
	}else{
		return false;
	}
}

function arena_list($mysql_link){
	$arenas_res = mysql_query('SELECT id_arena, adresse_pays, adresse_province, adresse_ville, nom FROM arenas ORDER BY adresse_ville, nom', $mysql_link);
	while($arena = mysql_fetch_assoc($arenas_res)){
		$arenas[$arena['id_arena']] = $arena;
	}
	return $arenas;
}
?>