RE: [PHP-DB] sql problem
| From: | Mats Remman | Date: | Tue, 26 Jun 2001 08:39:41 +0000 |
| Subject: | RE: [PHP-DB] sql problem | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-9829@lists.php.net to get a copy of this message | ||
@a is here an internal 'session' variable used in sql databases (atleast
mysql).
simple usage :
select @a:=1;
-> 1
select @b:=10;
-> 10
select @a + @b;
-> 11
These variables are used to hold temporary numbers and characters, so the
interaction between the script language and the database can be held to a
minimum.
Mats Remman
PHP Developer, MySQL DBA
Coretrek, Norway
+47 51978591 / +47 91623566
> -----Original Message-----
> From: Fai [mailto:fai5@hknet.com]
> Sent: Tuesday, June 26, 2001 5:55 AM
> To: php-db@lists.php.net
> Subject: [PHP-DB] sql problem
>
>
> SELECT @A:=SUM(salary) FROM table1 WHERE type=1;
> UPDATE table2 SET summmary=@A WHERE type=1;
>
> What does @A: mean?
>
> Thank you very much!
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>