> I have seprate table to stats.
> When any dealer create the Ad, a field inserted in table
> for reporting.

> that table have id, created, dealerid, name, template

> I need to create a bar graph and show the report.

> I don't wanna run the query too many times.

> is there any way that I just run the query once and it
> tell me which dealer have how many enteries in table?

> thanks

select dealderid,
  count(id) as adcount
from mytable
group by dealerid

Of course, you'll probably want to join that to the table containing
your dealer information, but that's the direction you want to head

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to