Not sure if this is an SQL question but I suspect it starts with putting the PHP script together.
I have a small application that allows our sales team to submit very simple development requests.
In my request form I have the following fields:
date, user_id, description, team, assigned, request, sub_request,status
This is slightly complex in its makeup as most of these fields are references to other tables and in the case of the user_id, this will hold an id to a different database, as the user authentication is managed by a separate DB, `login`.
The team, assigned, request, sub_requests and status fields are similar in that they reference separate tables in the same DB (`requests`).
So when I want to list all requests, I need to understand how I compile the query to get the names of the id's referenced in the main table.
Are you following?
Basically, I see a lot of WHERE clauses (or probably a join), but I don't know how to reference another database.
As I say, this is probably mainly an SQL question, but I do need to understand how I can write my script to include connections to both databases?
Or is there a better way of doing this?
I have a small application that allows our sales team to submit very simple development requests.
In my request form I have the following fields:
date, user_id, description, team, assigned, request, sub_request,status
This is slightly complex in its makeup as most of these fields are references to other tables and in the case of the user_id, this will hold an id to a different database, as the user authentication is managed by a separate DB, `login`.
The team, assigned, request, sub_requests and status fields are similar in that they reference separate tables in the same DB (`requests`).
So when I want to list all requests, I need to understand how I compile the query to get the names of the id's referenced in the main table.
Are you following?
Basically, I see a lot of WHERE clauses (or probably a join), but I don't know how to reference another database.
As I say, this is probably mainly an SQL question, but I do need to understand how I can write my script to include connections to both databases?
Or is there a better way of doing this?