Jump to content

MYSQL/PHP Query


paolorossi07

Recommended Posts

To say i'm a novice user at using php/mysql is an understayement, so i need a little help!

 

I currently have these tables set up in my database for a building control web site, what it is simply is that customers can enter the web site and submit their details to request an inspection, (got that bit working) Then the inspector will log on and pick and assign himself to jobs in that area!

 

CUSTOMER

Customer ID

Customer Name*$

Customer Address*$

Customer Postcode*$

Customer Contact Tele Number*$

Customer E-Mail*$

Application ID

 

Inspection Request

Inspection ID

Inspection Address*$

Inspection Stage*$

Inspection Date Requested*$

Area Name*$

Customer ID

Inspector ID

 

Inspector/Inspections

Inspector ID

Inspections ID

 

Inspector

Inspector ID

Inspector Name

Inspector Mobile Number

Inspector E-Mail

Area ID

Inspection ID

 

Login

Login ID

Login Username

Login Password

Inspectors ID

 

Area

Area ID

Area Name

Inspector ID

 

*What the customer needs to submit in the online form

$ what inspectors need to see

 

What i need to do is run a a query which would allow the inspectors to login and see the relevant information($) and then a script where they can assign themselves to the job????

 

Any help would be much appreciated, any more information just ask!

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/43938-mysqlphp-query/
Share on other sites

To retrive the information for inspection for logged in investor

 

 

SELECT  Customer.Customer Name

Customer.Customer Address

Customer.Customer Postcode

Customer.Customer Contact Tele Number

Customer.Customer E-Mail

Inspection Request.Inspection Address

Inspection Request.Inspection Stage

Inspection Request.Inspection Date Requested

Inspection Request.Area Name

 

FROM CUSTOMER,Inspection Request

WHERE CUSTOMER.CUSTOMER ID=Inspection Request.CUSTOMER ID

AND Inspection Request.Inspector ID = [investor id of login investor]

 

and then a script where they can assign themselves to the job?

-- Describe some thing more for this

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/43938-mysqlphp-query/#findComment-213365
Share on other sites

Thanks

 

once the query is run it will/should show all the inspections for the day (the day the inspector logs on) in a certain area, i would like each inspection to have a drop down list of inspectors next to it so they can assign themselves to the inspection so nobody else can (is this done in php)??

Link to comment
https://forums.phpfreaks.com/topic/43938-mysqlphp-query/#findComment-213600
Share on other sites

  • 2 weeks later...

What if i wanted to narrow this down to today date(the day the inspectors log on)

 

 

SELECT  Customer.Customer Name

  Customer.Customer Address

  Customer.Customer Postcode

  Customer.Customer Contact Tele Number

  Customer.Customer E-Mail

  Inspection Request.Inspection Address

  Inspection Request.Inspection Stage

  Inspection Request.Inspection Date Requested

  Inspection Request.Area Name

 

FROM CUSTOMER,Inspection Request

WHERE CUSTOMER.CUSTOMER ID=Inspection Request.CUSTOMER ID

AND Inspection Request.Inspector ID = [investor id of login investor]

 

Link to comment
https://forums.phpfreaks.com/topic/43938-mysqlphp-query/#findComment-220415
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.