hello Friends
I'm trying to Create View to filter records base on user department .
at sign in it require Department for the user save in admin table ,the when add record in other table "archive" have field to add multiple value which represent department that can see this file , please note i'm normal user not professional and not well known of MySQL statement , i tried this code to filtrate it ,
@DIVI="SELECT a.Division FROM admin AS a WHERE ( a.ID =USER_ID)",
SELECT
archive_app.ID,
archive_app.`Subject`,
archive_app.Reference_No,
archive_app.Details,
archive_app.Upload,
archive_app.Box_file_catg,
archive_app.Division,
archive_app.Uploader,
archive_app.Uploading_date,
archive_app.Statues,
archive_app.From__,
archive_app.Type__,
archive_app.Date,
archive_app.Source__
FROM
archive_app
WHERE
( @DIVI IN ( archive_app.Division ) )
please any one could help me to do this ?.
thanx and sorry for my bad English lang.