in my database, i have proj1, proj2 … up to proj10.
is there any possibility to query base on the number
$w . onReady ( async function () {
var myDatabase = “allProject” ;
var usernameField = “username” ;
let up = $w ( ‘#username’ ). text ;
let no = 1 ;
getProjName ( myDatabase , usernameField , up , no )
}
async function getProjName ( myDatabase , usernameField , user , no ) {
return wixData . query ( myDatabase ). eq ( usernameField , user ). find (). then (( results ) => {
let items = results . items ;
let item = items [ 0 ];
**return** item . pro[no] ;
})
}