1
Just do it this way:
Select count(*) as contaRegistros from tb_produtos;
It’s not working because of your Where:
where prod_nome like '%"+ +"%';
You must have copied it from some chunk of code wrong.
If you need to research some value, do it this way, let’s assume that the searched value is 'test':
Select count(*) as contaRegistros from tb_produtos where prod_nome like '%teste%';
Your Where is half wrong, what your intention with it?
– Gustavo Fragoso
I want to search the quantity according to the name , in case the result of this select I put was to return all records since the search field is empty
– User1999