RE: [PHP] Paging and permissions

2011-02-09 Thread Ashley Sheridan
On Wed, 2011-02-09 at 13:27 +0200, Arno Kuhl wrote: > Instead of serializing the articles, you only need their IDs. Using > > $sql .= ' where id in (' . implode(',', $ids) . ')'; > > you can load the data for a page of results in a single query. Storing the > IDs is much cheaper than the art

RE: [PHP] Paging and permissions

2011-02-09 Thread Arno Kuhl
Instead of serializing the articles, you only need their IDs. Using $sql .= ' where id in (' . implode(',', $ids) . ')'; you can load the data for a page of results in a single query. Storing the IDs is much cheaper than the articles. If the permissions are fairly static (i.e. access for use

RE: [PHP] Paging and permissions

2011-02-09 Thread Ashley Sheridan
On Wed, 2011-02-09 at 13:03 +0200, Arno Kuhl wrote: > On Tue, 2011-02-08 at 14:36 +0200, Arno Kuhl wrote: > > I'm hoping some clever php gurus have been here before and are > willing to > share some ideas. > > I have a site where articles are assigned to categories in >

RE: [PHP] Paging and permissions

2011-02-09 Thread Arno Kuhl
On Tue, 2011-02-08 at 14:36 +0200, Arno Kuhl wrote: I'm hoping some clever php gurus have been here before and are willing to share some ideas. I have a site where articles are assigned to categories in containers. An article can be assigned to only one c

Re: [PHP] Paging and permissions

2011-02-08 Thread David Harkness
On Tue, Feb 8, 2011 at 4:36 AM, Arno Kuhl wrote: > But it might be an option if done once at the start of each > search or list request, and then use that temporary modified result set for > subsequent requests on the same set. Instead of serializing the articles, you only need their IDs. Using

Re: [PHP] Paging and permissions

2011-02-08 Thread Tolas Anon
On Tue, Feb 8, 2011 at 1:36 PM, Arno Kuhl wrote: > I'm hoping some clever php gurus have been here before and are willing to > share some ideas. > > I have a site where articles are assigned to categories in containers. An > article can be assigned to only one category per container, but one or m

Re: [PHP] Paging and permissions

2011-02-08 Thread Ashley Sheridan
On Tue, 2011-02-08 at 14:36 +0200, Arno Kuhl wrote: > I'm hoping some clever php gurus have been here before and are willing to > share some ideas. > > I have a site where articles are assigned to categories in containers. An > article can be assigned to only one category per container, but one

Re: [PHP] Paging and permissions

2011-02-08 Thread David Hutto
On Tue, Feb 8, 2011 at 7:36 AM, Arno Kuhl wrote: > I'm hoping some clever php gurus have been here before and are willing to > share some ideas. > > I have a site where articles are assigned to categories in containers. An > article can be assigned to only one category per container, but one or mo