No cache version.

Caching disabled. Default setting for this page:enabled (code DEF204)
If the display is too slow, you can disable the user mode to view the cached version.

Rechercher dans le manuel MySQL

3.6.5 Using User-Defined Variables

You can employ MySQL user variables to remember results without having to store them in temporary variables in the client. (See Section 9.4, “User-Defined Variables”.)

For example, to find the articles with the highest and lowest price you can do this:

  1. mysql> SELECT @min_price:=MIN(price),@max_price:=MAX(price) FROM shop;
  2. mysql> SELECT * FROM shop WHERE price=@min_price OR price=@max_price;
  3. +---------+--------+-------+
  4. | article | dealer | price |
  5. +---------+--------+-------+
  6. |    0003 | D      |  1.25 |
  7. |    0004 | D      | 19.95 |
  8. +---------+--------+-------+
Note

It is also possible to store the name of a database object such as a table or a column in a user variable and then to use this variable in an SQL statement; however, this requires the use of a prepared statement. See Section 13.5, “Prepared SQL Statement Syntax”, for more information.


Find a PHP function
Error Infobrol

Can not display this page of the Infobrol website

Type of error (18-01)

Unknown format specifier "&"

Please try again in a few minutes…

Return to the home page




Steph