You are here: Re: mysql query question « PHP Programming Language « IT news, forums, messages
Re: mysql query question

Posted by Jerry Stuckle on 04/25/06 18:17

Bob Bedford wrote:
> 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
>
>
>

Bob,

This is a SQL question, not a PHP one. Try one of the newsgroups for your
database, i.e. comp.databases.mysql if it's MySQL.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация