Source

myswap / 1 / code / App / Lib / Model / SwapModel.class.php

Full commit
<?php
class SwapModel extends Model{
	protected $fields = array(
	'swap_id', 
	'user_id', 
	'content', 
	'_pk'=>'swap_id',
	'_autoinc'=>true
	);
	public function getSwaps($UserModel)
	{
	$user_id=$UserModel["user_id"];
	return  $this->query("select * from __TABLE__ where user_id=$user_id ORDER BY swap_id DESC");
	}

}
?>