Search Postgresql Archives

Inject rows into query resultes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I am having a problem where I need to inject rows into a query result. That is

I have a list of add records, lets say car listings which I select from a table. The order of the results are given either by the user or default/initial.

I now want to inject featured car adds after every 5th record. (coming from the same table)

Right now, I am doing this on the PHP just calling the query twice but I am wondering if there is a way to only run one query.

The main problem is that 
a) i am using paging so the original listing should not be affected
b) the injected records should not be in the results returned for the current page.

Any one having an idea how to solve that?

Thanks 
Alex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux