Skip to content

Instantly share code, notes, and snippets.

@smiler
Created March 18, 2013 12:52
Show Gist options
  • Save smiler/5186950 to your computer and use it in GitHub Desktop.
Save smiler/5186950 to your computer and use it in GitHub Desktop.
$paddle = $this->request->post('paddle');
// ...
if( $bid >= $object['reserve_price'] )
{
$paddle = db::select('*')
->from('paddles')
->where('paddle_nr', '=', (int) $paddle)
->where('auction_id', '=', $object['auction_id'])
->execute()
->current()
;
if( ! $paddle )
{
return array(
'error' => 2,
'error_message' => 'Paddle ' . $paddle . ' was not found in database'
);
}
} else {
$paddle = NULL;
}
// Osåld
if( $bid < $object['reserve_price'] )
{
$paddle['id'] = NULL;
}
// Inrop från FM
if( $object_bid_absentees['type'] == 'inrop' && ! $object_bid_absentees['user_id'] )
{
$paddle['id'] = NULL;
}
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment