Click to See Complete Forum and Search --> : SQL/PHP Small Question


chadsten
06-17-2008, 10:28 AM
My first post is (probably) an easy one. We are building a real estate tracking system, and for our user permissions we have run into a question. We have each "property" in a row, and one of the columns for these rows is "users". This will be the unique ID/IDs attached to this "property". These are set to match the user that is pulling the page "uid" that each user has assigned in a separate table. We are looking for some sort of built in function, or something, that would be able to check and see if $attempting_uid matches any uids stored in an array built out of the string that has the set uid/uids for that project.

store attempting user's uid in variable ($attempting_uid)
store string that contains the 1 or more uids that are set on each project(users column)($allowed_uids)
check to see if $attempting_uid matches ANY of the $allowed_uids array


I sure hope that it is simple enough, I am horrible at explaining myself, and don't generally have this pointed of a problem. Thanks guys/gals/Martians!

* From mod - keep all communication on the forum, for any forum questions *

chazzy
06-17-2008, 04:03 PM
your explanation is simple enough, but you didn't really pose a problem/question.

chadsten
06-17-2008, 04:14 PM
your explanation is simple enough, but you didn't really pose a problem/question.

I was afraid of that. I have done some work on it today, and I am not sure of the question now either...I think I need to create a table for each project, and have each row as an assigned uid that has permission. And a table for each user and have earch row as a project that they are assigned permission to. If you have any insight on this one, let me know...and to be quite honest, I don't usually run into stuff that stumps me this much, but I am a bit of a novice when it comes to SQL from a custom ground up build standpoint. So my questions aren't that great. Thanks!