LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-12-2013, 12:10 AM   #1
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
mysql query


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:

Quote:
select d_name from host;
Can any one help me with writing this cursor with REPEAT.

Last edited by divyashree; 12-12-2013 at 04:14 AM.
 
Old 12-15-2013, 06:52 PM   #2
Sydney
Member
 
Registered: Mar 2012
Distribution: Scientific Linux
Posts: 147

Rep: Reputation: 36
Hi have you checked out this documentation from the comments you may find Loop to be easier to do this with.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide mouse cursor/change cursor location? mrjamin Linux - Software 4 09-27-2010 10:09 AM
[SOLVED] [X Error on Debian] could not open default cursor font 'cursor' sl33p Linux - Newbie 4 07-30-2009 03:25 PM
NX Error: Could not open default cursor font 'cursor' mickeyboa Fedora 0 02-09-2008 04:31 PM
KDE cursor too small: how to make cursor bigger? xlq Linux - Newbie 2 04-02-2007 08:37 AM
Could not open default cursor font 'cursor' at startx with slackware 10.2 bgryderclock Slackware 3 01-02-2006 10:36 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration