Results 1 to 9 of 9
Nov 26, 2008, 12:15 #1
Display query results before all results are retrieved???
I have a table with about 500,000 rows, not much I know.
Is there any way to Display the results of the query as they are retrieved, instead of waiting till all the rows are returned and then displaying.
I'm also using pagination at 10 entries per page. Max return is 150 rows. I'm using LIKE, and from what I've read, INDEXES don't support the LIKE claus. Any suggestions please??????You know you cooler than me...
Nov 26, 2008, 12:24 #2
Are you going to display 500.000 rows in one page?
Nov 26, 2008, 12:25 #3
no that's just how large the table is... the max than can be displayed is 150 entries, at 10 rows per page for a total of 15 pages. What I would like is for the first page to be echo'd while the rest of the results are retrieved.You know you cooler than me...
Nov 26, 2008, 12:27 #4
Why not retrieve only the 10 rows you're going to display. Do a search for 'pagination' here or google for it, and you'll find lots of help
Nov 26, 2008, 12:29 #5
see, i dont know which 10 rows will be displayed. the whole table must be scanned. but thanks for the help.You know you cooler than me...
Nov 26, 2008, 12:36 #6
I see. I guess that's a problem, because as far as I know, MySQL gives controll back to the PHP script (assuming you use PHP ) after completion of the query.
But... I'm curious... if you don't know what rows to show when you query the table, then how do you decide once the results come back to the script?
Nov 26, 2008, 12:43 #7You know you cooler than me...
Nov 26, 2008, 14:34 #8
- Join Date
- Feb 2004
- Tampa, FL (US)
- 0 Post(s)
- 0 Thread(s)
Nov 26, 2008, 21:01 #9
yes i use order by
SELECT t,d,r FROM table WHERE (t LIKE '%a%' AND t LIKE '%b%' AND t LIKE '%c%' )OR (d LIKE '%a%' AND d LIKE '%b%' AND d LIKE '%c%' )ORDER BY rYou know you cooler than me...