Get all post and count from db phalcon

i have 2 user in my blog. there user-1 have 3 post. in this case visitors visit post-1' 20 time, post-2 40 time and post-3 100 time. and user-2 have 2 post which visitors visits 15 and 40 times. i want to count all the post for each user in phalcon. i cant figure it out. im am unable to bind or make this query.

[controller]

public function index() {      $pcount = Blogs::findBybauthor($this->session->get('uname'));   $posted = count($pcount);   $x = [];   $v = Blogs::findBybauthor($this->session->get('uname'));   foreach($v as $a)   {    echo($a->views.'<br/>');   }     } 

Replay

Category: php Time: 2016-07-30 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.138 (s). 12 q(s)