Garayed.com  

Go Back   Garayed.com > PHP
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-25-2006, 02:40 PM
Bob Bedford
 
Posts: n/a
Default mysql query question

Hello all,

I'm creating an invoice process for my website.

I'm trying to show the invoice processing on a simple way. Let's explain
how:

I'm creating a table with the first column having the client's name. The
second column has the article description.
Now for every article, there is an invoice sent or to be sent (if the client
ordered an item I can't send an invoice since he didn't get the article).
Now for every sent invoice there can be one or more payments.

Since I'm getting invoice status, I don't want to see invoice that are
completely paid. I only want to get the "current" payement shown on the
grid. So I've a table called invoice and an other called payment. My table
should show the invoice and all the relative payment until the total of the
payment reach the invoice total.
So I may have this:
client X invoice 1 500$
invoice1 payment 250$
invoice1 payment 200$

My query, in pseudocode, is: select invoice,payement from the tables for
client X where TotalPayment < totalinvoice

How to create such query ? I can't find even in google. I'm not english so
probably I don't try the corret search string in google
(have tried mysql addition, mysql total)

Bob



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:10 AM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.