|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Please Help - I don't know what I'm doing
I'm trying to set up what in essence will be a secure message board - its a mentoring system. The db has been created IN MS SQL Server and i trying to write the web pages in php. My Problems are: - - i need to search through my database with specific criteria to link a new person to. - i need to make sure that messages can only be seen be specific users Some1 any1 please help me figure out how to do this - your help will be greatly appreciated |
|
#2
|
|||
|
|||
|
RE: Please Help - I don't know what I'm doing
With any project like this, first of all you need to be sure your database structure will support the kind of application you are trying to build. Could you post a list of your tables and their fields, and explain the relationships between the tables? Also I'll need an idea of what privacy restrictions you need to impose, i.e. whether messages will be totally private between mentor and mentee or if there will be group access to messages, plus some explanation of what you mean by "search through my database with specific criteria to link a new person to". Are we talking well-defined criteria like age or area of expertise, or something more "fuzzy"?
Sorry to sound demanding, but I can't offer practical advice without something concrete to go on. |
|
#3
|
|||
|
|||
|
RE: Please Help - I don't know what I'm doing
Right - the messages between the mentor and mentee will be totally private.
Tables Mentors – will hold the personal details of the mentor. Mentees – will hold the personal details of the mentee including who they are being mentored by. Messages – will hold all the messages that have been sent by the user, will be linked to both the mentor & mentee tables. MentorsMentees – as the mentee will be able to choose a new mentor we need a table that will show which mentors have mentored who & the messages that they have sent. Mentor Match – this table will hold the details of the mentors on which the mentee will conduct their searches. Mentors and mentees joined via mentormentee mentormentee linked to messages mentormacth linked to mentor where all the mentors search criteria stored. if you need any more information give us a shout - thanx very much for doing this. Claire |
|
#4
|
|||||
|
|||||
|
RE: Please Help - I don't know what I'm doing
For starters, I think you have too many tables here. I'm assuming you want to keep a history of who has mentored whom, rather than just a note of which mentor a mentee currently has. So, I would suggest the following table structure:
Table Members: * MemberID - unique ID that won't change (like a forum user id) * Member Name * Member Password - use password(), encode() or whatever function you feel comfortable with to encrypt this * Various fields as needed to hold the member's personal details * Member Status - i.e. mentor or mentee? * text field for searching by mentees (obviously this field will be empty for mentee records) N.B. I have lumped mentors and mentees into one table to make the logging in process easier. Table History: * Mentor ID - will contain a member ID * Mentee ID - will contain a member ID * Date Started * Date Ended Table Messages: * Message ID - an auto-increment field is ideal for this * Sender ID - will contain a member ID * Recipient ID - will contain a member ID * Date * Message I use sessions to maintain security. Once the user logs in, the session cookie holds their user id and this is used in subsequent database queries to only show the information that refers to them, e.g. to see my "inbox" php Code:
Every page that contains user-specific information will need to contain this if/else block. You will obviously also need a login page that checks a member id and password against the entries in the Members table. If you're new to PHP and databases, I would strongly recommend "PHP Essentials" by Julie Meloni - it has lots of great practical examples and isn't too heavy on the techie details Ed |
|
#5
|
|||
|
|||
|
RE: Please Help - I don't know what I'm doing
Thanks a lot i'll try this
Claire |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Please Help - I don't know what I'm doing |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|