$q=mysql_query("SELECT * FROM sponsorships WHERE id='$sponsorships_id'");
$current=mysql_fetch_object($q);
unset($log);
$log=array();
if($current->fundraising_type!=$fundraising_type)
$log[]="Changed sponsorship type from $current->fundraising_type to $fundraising_type";
if($current->value!=$value)
$log[]="Changed sponsorship value from $current->value to $value";
if($current->status!=$status)
$log[]="Changed sponsorship status from $current->status to $status";
if($current->probability!=$probability)
$log[]="Changed sponsorship probability from $current->probability to $probability";
if(count($log)){
mysql_query("UPDATE sponsorships SET fundraising_type='$fundraising_type', value='$value', status='$status', probability='$probability' WHERE id='$sponsorships_id'");
foreach($logAS$l){
mysql_query("INSERT INTO sponsors_logs (sponsors_id,dt,users_id,log) VALUES (