Anyone know why this doesn't work? I found the "NOT IN" command online but I'm not 100% sure about it..... any help is appreciated
Currently its displaying the same results every time, no matter what "page" i put it on, obviously not the desired results, i'm familiar with the 'LIMIT' command in mysql, but that doesn't work in mssql.....here's my code i'm trying:
Expand|Select|Wrap|Line Numbers
- $posts_per_page = 50;
- $page = 2;
- $page_number = ($page * $posts_per_page) - 50;
- $result=mssql_query("SELECT TOP $posts_per_page * FROM Message_Board
- WHERE $searchby LIKE '%$search2%' AND id NOT IN
- ( SELECT TOP $page_number * FROM Message_Board WHERE thread_number=0 ORDER BY TStamp DESC )
- ORDER BY TStamp DESC");