Advertisement

06.03.2008 at 07:14AM PDT, ID: 23453193
[x]
Attachment Details

MySql Statement

Asked by jporter80 in MySQL, PHP Scripting Language

Tags: MySql PHP

I have tblinv with this type of data:

InvID-----------------invJobID-----------------------InvTotal
1-----------------------2---------------------------1000.00
2-----------------------2---------------------------2000.00
3----------------------3----------------------------1500.00
4----------------------3----------------------------2000.00

Another tblpay:

payID-----------------payJobID-----------------------InvTotal
1-----------------------2---------------------------500.00
2-----------------------2---------------------------2000.00
3----------------------3----------------------------500.00
4----------------------3----------------------------1500.00

another tbljob with a JobID that is the primary key that is tied to payJobID and invJobID

I want a sql statment that will output it like this

JobID-----------------------InvTotals-----------------PayTotal---------------Balance
2-----------------------------3000.00-----------------2500.00---------------500.00
3-----------------------------3500.00----------------2000.00----------------1500.00

Can it be done???  Thanks for your help!!!!Start Free Trial
[+][-]06.03.2008 at 07:26AM PDT, ID: 21700738

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 07:32AM PDT, ID: 21700787

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 07:47AM PDT, ID: 21700928

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 08:05AM PDT, ID: 21701105

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MySQL, PHP Scripting Language
Tags: MySql PHP
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 2
Solution Grade: B
 
 
[+][-]06.03.2008 at 08:17AM PDT, ID: 21701244

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 11:49AM PDT, ID: 21703282

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628