export default async function load(){
let { data: count, error } = await supabase
.from('smsspam')
// My table is named smsspam
.select('*', { count: 'planned', head: true })
// selecting all entries in the table and counting them, using head because I only want the count.
//the results should look like:
// {"count": 3,"status": 200, "statusText": "OK" } but returns null.
console.log("Total Rows",count)
if (error) {
console.log(error.message);
}
return {
props:{count}
};
}
export default async function load(){
let { data: count, error } = await supabase
.from('smsspam')
// My table is named smsspam
.select('*', { count: 'planned', head: true })
// selecting all entries in the table and counting them, using head because I only want the count.
//the results should look like:
// {"count": 3,"status": 200, "statusText": "OK" } but returns null.
console.log("Total Rows",count)
if (error) {
console.log(error.message);
}
return {
props:{count}
};
}