I got 4 fields

```
page_id
page_category_id
page_sequence
page_path

```

For example 

```
record 1

page_id = 1
page_category_id = 22
page_sequence = 1
page_path = "1.jpg"

record 2

page_id = 1
page_category_id = 22
page_sequence = 2
page_path = "2.jpg"

record 3   

page_id = 1
page_category_id = 23
page_sequence = 1
page_path = "23_1.jpg"

record 4
page_id = 1
page_category_id = 23
page_sequence = 2
page_path = "23_1.jpg"

record 5
page_id = 1
page_category_id = 23
page_sequence = 3
page_path = "23_1.jpg"

.. and more records

```

I want to do a draw statement that

```
$sql_select = "select page_category_id from my_table where max(page_sequence) < 3";

```

it will show all the page\_category\_id who max(page\_sequence) is less than 3.

but I can't do it with max(page\_sequence) as the where condition

How can I get it working.. **Thanks**!