Database save a special hash

hi dear techor.

i have a question that i wanna save this console.log(transaction.hash) which i call the contract function and return .
how can i save it in data in moralis?
i didnt use Moralis.authenticate(). because i dont wanna so many data .
i use moralis .enabele(), then i call the contract function .and i only wanna save this special hash in data.

you can make a cloud function, send that hash as parameter to the cloud function and in the cloud function you can save it in the database in a table

thanks for your reply , is there a simple way to save the data like" Add a new column" , so that i can save the hash in this column ?

you can add a new column from the server dashboard, you can create the table there too

after that you have examples in documentation on how to add the data to a table:

https://docs.moralis.io/moralis-dapp/database

query.set(table_name, “value”)
query.save()

thank you , where is the examples ? i dont know how to write the hash in a new table , can you give me a clear example , i am not so smart at coding .hahahaha

you can read the documentation, you will find examples there

you can save a hash as a string

thank you for your reply
i create a string column at dashboard .named Niubi in user
code:
const transaction = await Moralis.executeFunction(sendOptions);
console.log(transaction.hash);
await transaction.wait();
query.set(table_name, “Niubi”)
query.save(hash);
after i call the contract function , return hash ,am I right to save it in database?

this doesn’t work directly like that, you have to make the query first or to have an object that you update

read in documentation