getting codes from my db is not working. Any advice?

Ok well, here we have some difficulties…

But at first i want to tell you that you perhaps should learn to use this forum the right way.

  1. Do not show CODE-PARTS in plain text or in a pic. Do it in CODE-BLOCKs, like the following example…
$w.onReady(async function() {
  let RESULTS = await checkData(); 
  console.log("RESULTS: ", RESULTS);
});
  
function checkData(){
  wixData.query("Diamond")
  .find()
  .then((res)=>{return res.items})
  .catch((err)=>{console.log(err);});
}
  1. Your code was not right. Take a look onto the given example above.

  2. Use the console to investigate your results.