• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
user profile fields

I'm considering using UserSpice as the user logic in a project. My UseCase is targeted towards college students.

The project is to be a directory/profile kind of app where users signup/join, and modify the profile data. The user profile will have multiple fields. Since the target users are college students, the fields will look like the following:

-Year (1st/2nd/3rd)

Setting up the tables/schema would be trivial.

My issues/question, is how I might set up the logic to allow a user to be able to query the underlying db/tbls to then generate/display a list of users based on the different fields.

Should the app/logic have hardcoded query/sql where the input columns are defined?

The app would/might have a select page where each of the above fields maps to a select/input field in a "form". The user would be prompted to select any/all of the fields. A "default" value would be assigned to any field not selected by the user.

The app would then use ajax/async calls to then process the backend logic..

This approach would/should work with a single well defined/well checked/qualified query statement.

The resulting rows would then drive a paged set of rows for the user to view in the clientside app.

Does this make sense? Have I missed anything?

If anyone has any thoughts on this, feel free to post.

Writing a search engine is a little different than a typical db query. I wrote one for you using regular php (not ajax) that searches the users table and does the proper binding etc to prevent sql injection attacks and stuff like that. If you install userspice and replace the stock index.php file with this
You will see that I wrote a quick search engine that lets you search the first and last name columns of the users table and gives you the results. I hope it helps.

Forum Jump:

Users browsing this thread: 1 Guest(s)