Hi, I have this simple code to get a numeric value from the first row of my database. I simply query the database and the display the result in a text box. The code work as I expected in preview mode but not live. I have already set the permission correctly. I can insert data into the database correctly. Here the code
import wixData from ‘wix-data’ ;
$w.onReady( function () {
});
export async function bookButton_click(event) {
let date = $w( “#dateInput” ).value;
let boxText = $w( ‘#boxText’ );
let result = await wixData.query(“database”)
.eq( “date” , date)
.find()
boxText.text = result.items[ 0 ].numberPerson.toLocaleString()
}