I do have thousands of urls in my database. what I want to do is display all urls in multiple pages say number of URLS per page is 100 and alphabetically then when ever a user search for a URL info it should get updated on relevant page. for example if it is google.com then it should get updated on "G" page and no duplicate entry. how can I do this with PHP and MySQL??
views:
40answers:
2
+2
A:
You would need to combine a WHERE
clause in your SQL with a LIMIT 0,100
or something.
You can use the where clause to limit it by letter WHERE name LIKE 'G%'
and you can use the limit clause to get the first 100 rows by doing LIMIT 0,100
webdestroya
2010-05-13 17:43:12
A:
fist of all alphabetically ordered list:
SELECT url_column_name
FROM my_table
ORDER BY url_column_name ASC
what you wanna do is a pagination you can read about pagination here: http://hype-free.blogspot.com/2008/10/efficient-sql-pagination-method.html
holms
2010-05-13 17:47:20