I have 3 tables a,b,c in a mysql db.
PHP Code:
select count(*) from services a inner join objects b ON a.service_id=b.object_id where b.name=@var;
The above join will give me counts where the @var variable will be selected from a row in table c.
The output will print the rowname(@var) and its count from join statement.
I will query the table c by:
Can any one help me with writing this cursor with REPEAT.