What you wrote will work just fine. It is very easy to create a test case
and see if it works, saves you the trouble of posting to the list.

mysql> create table test (a int, b int, c int);
Query OK, 0 rows affected (0.09 sec)

mysql> insert into test values (2,3,5);
Query OK, 1 row affected (0.00 sec)

mysql> insert into test values (3,3,5);
Query OK, 1 row affected (0.00 sec)

mysql> select * from test where a+b=c
|    2 |    3 |    5 |
1 row in set (0.00 sec)

> Can someone tell me if it is possible to have a calculation in a SELECT
> statement.
>
> EG
>
> SELECT * FROM (table_name) where (col_1 + col_2 = col_3)
>
> I am using MySQL 3.23.xx and PHP4
>
> I only want to display those fields where the sum is true.
> Kindest Regards,
>
> Steve Lowe
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to