php - Is there a set filter option in MySQL -


i have database 2 tables - users , messages.
2 tables have records multiple companies.
have add companyno=$companyno queries e.g.

select * users companyno=$_session['companyno'] 

and

select * messages companyno=$_session['companyno'] 

is there way can set 'filter' in mysql companyno=$_session['companyno']
can ignore companyname=$_session['companyno'] sql queries and
mysql automatically return records $_session['companyno']

you can create views in mysql each value of $_session['companyno'] company , query them according companyno=$_session['companyno']. it's hack, not recommend :)


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -