Re: web-dev questions with mysql, php, and others
- From: "Tyler Littlefield" <tyler@xxxxxxxxxxxxx>
- To: <programmingblind@xxxxxxxxxxxxx>
- Date: Fri, 1 May 2009 10:39:18 -0600
Thanks, Tyler Littlefield Web: tysdomain.com email: tyler@xxxxxxxxxxxxx My programs don't have bugs, they're called randomly added features.----- Original Message ----- From: "niran" <public.niran@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx> Sent: Friday, May 01, 2009 10:58 PM Subject: Re: web-dev questions with mysql, php, and others
If I understand your MySQL quesstion correctly, Use something similar to below lineselect * from post_table order by pid desc limit 20; The order by and limit are the key here.However, I would create a date field to hold the post's creation date and sort descending on it rather than on the auto_increment ID field.HTH Tyler Littlefield wrote:Hello list,I'm writing a little tiney bbs system, just for something to give a few people for an example on php. Basically what I want is to refresh somehow with the website so that the newest posts will come up, without refreshing the whole page and making jaws go crazy.How can this be achieved?Second, I have a list in a table with poster's id, and their post with a pid (post id) that is auto_increment. The oldest message will be the lower id, so I need a way to sort it out with the highest id being the top, so from highest to lowest. Is there a way to do this when I request it from mysql? or do I just have to reverse the selection when I use php. I'm not sure how big this will get, but I'd also like to limit it say to max id-20. so it'd show from 100 to 120, if 120 was the max id, etc, rather than sending back all messages in a query when it gets to the point where there are hundreds in the system.Thanks, Tyler Littlefield Web: tysdomain.com email: tyler@xxxxxxxxxxxxx <mailto:tyler@xxxxxxxxxxxxx> My programs don't have bugs, they're called randomly added features.__________View the list's information and change your settings at http://www.freelists.org/list/programmingblind
__________View the list's information and change your settings at http://www.freelists.org/list/programmingblind
- References:
- web-dev questions with mysql, php, and others
- From: Tyler Littlefield
- Re: web-dev questions with mysql, php, and others
- From: niran
- web-dev questions with mysql, php, and others
Other related posts:
- » web-dev questions with mysql, php, and others - Tyler Littlefield
- » Re: web-dev questions with mysql, php, and others - niran
- » Re: web-dev questions with mysql, php, and others - Tyler Littlefield
- » RE: web-dev questions with mysql, php, and others - Sina Bahram
- » Re: web-dev questions with mysql, php, and others - Tyler Littlefield
- » RE: web-dev questions with mysql, php, and others - Sina Bahram
- » RE: web-dev questions with mysql, php, and others - Homme, James
- » Re: web-dev questions with mysql, php, and others - Tyler Littlefield
- » RE: web-dev questions with mysql, php, and others - Sina Bahram
- » Re: web-dev questions with mysql, php, and others - niran
- » Re: web-dev questions with mysql, php, and others - Tyler Littlefield
- » Re: web-dev questions with mysql, php, and others - Robert Lockwood
- » Re: web-dev questions with mysql, php, and others - Tyler Littlefield
- » Re: web-dev questions with mysql, php, and others - Trouble
- » Re: web-dev questions with mysql, php, and others - Tyler Littlefield
- » Re: web-dev questions with mysql, php, and others - tribble
- » Re: web-dev questions with mysql, php, and others - Tyler Littlefield
- » Re: web-dev questions with mysql, php, and others - tribble
- » Re: web-dev questions with mysql, php, and others - Tyler Littlefield
- » Re: web-dev questions with mysql, php, and others - Trouble
- » Re: web-dev questions with mysql, php, and others - Ricks Place
- » Re: web-dev questions with mysql, php, and others - Tyler Littlefield
- » Re: web-dev questions with mysql, php, and others - Tyler Littlefield
- » Re: web-dev questions with mysql, php, and others - Trouble
- » Re: web-dev questions with mysql, php, and others - Ricks Place
- » RE: web-dev questions with mysql, php, and others - Sina Bahram