Database Search

I have a database search option on my page (search by name) with a table and the code is below. Query seems to work, but it returns no data to the table, the table turns blank. I have name data in the live database. Not sure why it returns blank date to the table. Am I missing something?

import wixData from ‘wix-data’;
//For full API documentation, including code examples visit http://wix.to/94BuAAs

$w.onReady(function () {
//TODO: import wixData from ‘wix-data’;
});

export function button1_click() {
wixData.query(‘GameData’)
.contains(‘name’, $w(‘#namesearch’).value)
.find()
.then(res => {
$w(‘#searchresults’).rows = res.items;
});
}

Hi,

did you try to put some console logs along the method to see the data, tried to debug?

thanks,
Shlomi

hi Shlomi, thank you for replying. i was able to troubleshoot and fix the issue on my end. Have a great day.