mysql - Preserve from splitting results -


is there possible way select mysql database , preserve splitting results? i'd data previous day, it'll much, cannot split results:

select limit, not split (by value, i.e. user_id) onto separate results.

example

select ti.id, ti.date, ti.duedate, ti.datepaid, tii.invoiceid, tii.userid, tc.postcode, tc.country, (select group_concat(value) custom relid=tc.id) vatid invoices ti left join invoiceitems tii on tii.invoiceid=ti.id left join clients tc on tc.id=tii.userid ti.status='paid' , ti.nullmo_no null order tii.userid , tii.id 

now results, need split them without breaking userid. example 1 select returns 20 results, because there 15 invoices user 1, , 5 invoices user 2, next call returns rest, limit, not breaking user related group of results:

select part 1 (all user 1, user 2) part 2 (all user 3, user 4)

can done in 1 select statement?

id = 1,2,3,4,5,6,7,8,9,10

name = n1, n2, n3, n4, n5, n6, n7, n8, n9, n10

user_id = 1, 1, 1, 2, 2, 2, 3, 3, 4, 5 // split not divide

content = c1,c2,c3,c4,c5,c6,c7,c8,c9,c10

date = yesterday, yesterday, yesterday, yesterday, yesterday, yesterday, yesterday, yesterday, yesterday, yesterday

the deal select of them, limit, not split user_id, so: 1. yesterday 2. limit if per 1 or more user_id's there more results limit limit determined number of results.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -