hi,
i had a post in php re display a countdown for policy, it got side tracked to inserting the date properly into mysql database. that is now resolved.
what i have is a database setup like this, and if anyone could tell me if this is wrong design before i go any further i would appreciate as i dont want to come across issues later on.
DB:
Users Table
UserID
Username
Password
Client Table
ClientID
FirstName
LastName
DOB
Clients_UserID FK to User Table
Insurance Table
PolicyNumber
Provider
DueDate
DatePaid
Archived
Clients_CliendID FK to Clients Table
Mortgage Table
Account Number
Lender
ReviewDate
DatePaid
Archived
Clients_clientID FK to Clients Table
I want to have on my tasks page a list of all clients due date that week to current date display and not sure how to query the database to do this?
Also want to have on the other side of the page a list of all clients with their due date from all products that are over their due date and remain there until dealt with.
I have an archived column in the tables which is set to 1 when added to show as current but 0 when they archive the product so i dont want the archived products to show.
I am new to MYSQL so hope someone can help, i have read around a bit and looked at : http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-sub
I create a Recordset on my page using Dreamweaver CS3 PHP/MYSQL.
Current Attempt display from Mortgage Table when the due date = today but do not know how to take it to my next step:
SELECT clients.*, mortgage.*
FROM (clients INNER JOIN mortgage ON mortgage.clients_ClientID=clients.ClientID)
WHERE ReviewDate=CURRENT_DATE()
Many thanks