MySQL - Call a View inside a Stored Procedure Let's say, I have a table as follows
tbl_1
id             name                 status               usertype                         flag
================================================================================================
1              Name 1                  1                    2                               0
2              Name 2                  1                    3                               0
3              Name 3                  1                    1                               0
4              Name 4                  1                    4                               0
5              Name 5                  1                    5                               0


HTML PAGE
&lt;select id=&quot;type&quot; name=&quot;type&quot;&gt;

  &lt;option value=&quot;1&quot;&gt;1&lt;/option&gt;
&lt;option value=&quot;2&quot;&gt;2&lt;/option&gt;
&lt;option value=&quot;3&quot;&gt;3&lt;/option&gt;
&lt;option value=&quot;4&quot;&gt;4&lt;/option&gt;
&lt;option value=&quot;5&quot;&gt;5&lt;/option&gt;

&lt;/select&gt;

My requirement is that I need to get all the data from table where the usertype is selected from the html page by the user (could be 1, 2, 3,4,5, etc.)
I want to create a view, and call that inside stored procedure
I cannot pass an argument inside of a View. So, I was told to create a stored procedure, and call the view inside it. The problem is, I don't know how to do it.
... I was told to create a stored procedure, and call the view inside it.

You don't need a View.
You don't need a Stored Procedure.
Just select the data that you want to display, based on the criteria that you have.
select id, name, status, usertype, flag 
from tbl_1 
where usertype = ?
order by id ; 

The usertype argument will come from [the value of the selected &quot;option&quot; element within] the &quot;select&quot; element.
Depending on how your page(s) are structured, you might need an AJAX request to get the data or submitting a form containing the &quot;select&quot; element and processing that.