I don't know if it's useful or not but i am pasting this code
<?php
class team
{
var $id;
var $g1;
.......//similiar match positions variables
function team($id)
{
$this->id=$id;
$this->initstats($id);
return true;
}
function pq($match_pos,$id)
{
$query=mysql_query("select * from players where id='$id' and match_pos='$match_pos'");
if(empty($query))
return false;
else
return mysql_fetch_object($query);
}
function initstats($id)
{
$this->g1=$this->pq(1,$id);
return true;
}
}
/*------------------------------------------------------------------------------------------------------------------------*/
class match
{
var $a;
var $b;
var $schedule;
function match($id)
{
$this->initstats($id);
return true;
}
function initstats($id)
{
$this->schedule=mysql_fetch_object(mysql_query("select * from schedules where sch_id='$id'"));
$this->a=new team($this->schedule->home_id);
$this->b=new team($this->schedule->away_id);
return true;
}
}
/*---------------------------------------------------------------------------*/
$mh= new match(28);
match_exec()
//your game engine
?>
It's my code not copied
Thanks