let query1 = wixData . query ( “SEE” )
. gt ( “_createdDate” ,D ate,now( ))
let query2 =wixData . query ( “WATCH” )
. gt ( “_createdDate” ,D ate,now( ))
Promise . all ([
query1 . find (),
query2 . find ()]). then ( res => {
let allItems = [ res [ 0 ]. items , res [ 1 ]. items ]. flat ();
//and continue to work with allItems
})
if you don’t explicitly set the limit, the default is 50 per each of the queries (50 for query1 and 50 for query2).
If you wish to change the limit you can do something like:
let query1 = wixData.query("SEE")
.gt("_createdDate",Date,now())
.limit(400)
let query2 =wixData.query("WATCH")
.gt("_createdDate",Date,now())
.limit(400)
(Max limit it is 1000 per query)
@J.D. Little mistake ? ->100 per query?
Sure, I omitted a zero. Fixed. Thanks
Thanks, how do I make it unlimited?
You can’t. However you after you get the first 1000 you can get the next 1000 and so on until you have all of them.
See the while loop in the example here:
https://www.wix.com/velo/reference/wix-data/wixdataqueryresult/hasnext
Thanks, that is for a single query, how do I do same thing for multiple queries like below?
let b = wixData . query ( “SEEKERS” )
. contains ( “title” , $w ( “#input59” ). value )
let c = wixData . query ( “SEEKERS” )
. contains ( “ClassOfItem” , $w ( “#input59” ). value )
let d = wixData . query ( “SEEKERS” )
. contains ( “PhoneNumber” , $w ( “#input59” ). value )