( ! ) Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/codewin/public_html/sys/Ext/limonade/limonade.php on line 118
Call Stack
#TimeMemoryFunctionLocation
10.0004401584{main}( ).../index.php:0
20.0007415216require( '/home/codewin/public_html/sys/load.php' ).../index.php:19
30.0153752408require( '/home/codewin/public_html/sys/Ext/limonade/limonade.php' ).../load.php:50

( ! ) Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/codewin/public_html/routes.php on line 9
Call Stack
#TimeMemoryFunctionLocation
10.0004401584{main}( ).../index.php:0
20.07142933824require( '/home/codewin/public_html/routes.php' ).../index.php:22
Select only one row containing value and get minimum id from list. | CODE.WIN
MySQL
Select only one row containing value and get minimum id from list.

Select only one row with minimum id from table containing specified value.
Here 's my table

id A B
1 A1 A
2 A2 B
3 A3 B

And here's my query

"SELEC * FROM table WHERE B = B"

This query return all rows containing 'B'. How to get lowest id from this query?

Select only one row with minimum id from table containing specified value. Here 's my table | id | A | B | | --- | --- | --- | | 1 | A1 | A | | 2 | A2 | B | | 3 | A3 | B | And here's my query ```` "SELEC * FROM table WHERE B = B" ```` This query return all rows containing '**B**'. How to get lowest id from this query?

LIFE'S A BITCH AND I'M CUSTOMER WITHOUT WALLET

edited Apr 12 at 6:06 am

I found solution:

SELEC * FROM `accounts` WHERE `sent`='N' AND `id`=(SELECT MIN(`id`) FROM `accounts` WHERE `sent`='N')
I found solution: ```` SELEC * FROM `accounts` WHERE `sent`='N' AND `id`=(SELECT MIN(`id`) FROM `accounts` WHERE `sent`='N') ````

LIFE'S A BITCH AND I'M CUSTOMER WITHOUT WALLET

I found solution:

SELEC * FROM `accounts` WHERE `sent`='N' AND `id`=(SELECT MIN(`id`) FROM `accounts` WHERE `sent`='N')
I found solution: ```` SELEC * FROM `accounts` WHERE `sent`='N' AND `id`=(SELECT MIN(`id`) FROM `accounts` WHERE `sent`='N') ````

LIFE'S A BITCH AND I'M CUSTOMER WITHOUT WALLET

SELECT * `FROM`
```` mysql SELECT * `FROM` ````

LIFE'S A BITCH AND I'M CUSTOMER WITHOUT WALLET

edited Apr 12 at 6:23 am
62
3
1
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft