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
Post a Comment