Hello,
I'm cann't using query to MySQL like this:
SELECT name FROM cia WHERE region =
(SELECT region FROM table WHERE name = 'Brazil');
And
SELECT name FROM table WHERE count =
(SELECT max(count) FROM table);
I want to select COLUMN_NAME in TABLE where ID is max,
how I can do it?
--
Best reg
> -Original Message-
> From: Yevgeny Dyatlov [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 8:05 AM
> To: PHP-DB
> Subject: [PHP-DB] How I can use multiple results in MySQL
>
>
> I'm cann't using query to MySQL like this:
>
> SELEC
> SELECT name FROM cia WHERE region =
> (SELECT region FROM table WHERE name = 'Brazil');
would be:
SELECT cia.name
FROM cia, table
WHERE cia.region=table.region
AND table.name='Brazil'
> SELECT name FROM table WHERE count =
> (SELECT max(count) FROM table);
if there may be more than one rec