Code:
// A raw SQL statement
$sql = "SELECT income_id,user_id,sender_id,income_type_id,amount,income_definition,income_notes,transaction_date,status FROM user_income where (user_id = '$user_id' or sender_id = '$user_id')
UNION
SELECT outcome_id,user_id,receiver_id,outcome_type_id,amount,income_definition,income_notes,transaction_date,status FROM user_outcome where (user_id = '$user_id' or receiver_id = '$user_id')";
// Base model
$UserIncome = new UserIncome();
// Execute the query
return new Resultset(null, $UserIncome, $UserIncome->getReadConnection()->query($sql));
this is my resultset and when i want to add it on paginator its working bad (resultset return true result)
$paginator = new \Phalcon\Paginator\Adapter\Model(
array(
"data" => $account,
"limit" => 10,
"page" => 1
)
);
// sayfalanmış sonuçları al
$page = $paginator->getPaginate();
when i want to print_r page info there are results with [0] etc and whatever i do couldnt manage to pass.
Thanks