Page 1 of 1

Getting data with minimum lenght

Posted: Fri Jan 13, 2006 4:30 am
by wizzard81
Hi,

I have a database with a table with 10000 links but i want to grab out 200 links with a minimum description lenght is this possible via mysql?

Cheers
Kris

Posted: Fri Jan 13, 2006 5:14 am
by Jenk

Code: Select all

SELECT `column1` FROM `table` WHERE CHAR_LENGTH(`column2`) > 20
untested.

Posted: Fri Jan 13, 2006 6:47 am
by wizzard81
its not working

Posted: Fri Jan 13, 2006 9:18 am
by timvw
With MySQL it's possible as following:

Code: Select all

SELECT whatever
FROM table
ORDER BY CHAR_LENGTH('description') ASC
LIMIT 0, 200