Re: Re: question about columns in a table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I tried with the + sign following was the message=
"Resource id #3"

The page does not show the numeric figure. please
advice how to go about with this.

--- Pete <cgrp@xxxxxxxxxxxx> wrote:

> In message <fglirt+bu5a@xxxxxxxxxxx>, Sudhakar
> <finals27@xxxxxxxxx>
> writes
> >as suggested not to create a field which would add
> the numeric 
> >values in the tables, i used the select sum query
> however it does 
> >not work.
> >The table has 2 fields defined as aboutus &
> contactus as integer. In 
> >this case as i will be updating the columns every
> time there is a 
> >visit, this table will only have 1 row at all
> times. Is it because 
> >of this the query is not being executed.
> >
> >$count="SELECT SUM(aboutus, contactus) FROM
> visits"; 
> 
> SELECT aboutus + contactus FROM visits;
> 
> If you think of it like a spreadsheet, SUM works
> *down* the columns, and
> you need '+' to go across.
> 
> -- 
> Pete Clark
> 
> Sunny Andalucia
> http://hotcosta.com/Andalucia.Spain
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux