Completed

MySQL - Restrict view results by date

I have a view that returns a list of all bus passengers that need to be picked up on a given day (monday - sunday).

When a user is picked up, a record is written to a table named "trip_history". This table contains a date/timestamp for that ride. 2 rides are allowed per day/per rider - the ride to their destination and their ride home.

I want to add functionality to this view to restrict that list to not show riders that have already been recorded in trip_history for the AM and PM trip.

So, if the db view shows 3 riders available for pickup:

Jim

Jack

Beth

If I pick Jim up in the AM, I want the view to:

1. Check if the current system date/time is in the AM (time between 00:00:00 and 11:59:59)

2. Check the "trip_history" table to see if the latest (MAX) date/time for that rider occured between 00:00:00 and 11:59:59 of the current day

If both conditions are true, view should now show the following:

Jack

Beth

I want to repeat this process for the PM of the same day (time between 12:00:00 and 23:59:59)

The goal is to not allow for two pickups to occur for the same passenger within the morning, and conversely in the evening.

A dump of the tables is attached.

Skills: Database Administration, Database Programming, MySQL, PHP, Software Architecture

See more: mysql php display results date, mysql query results date range php, view results mysql html, display mysql database search results google maps, php mysql doesnt view search query, php mysql ajax view image uploaded, mysql loop query results, mysql show query results generic script, php mysql loop column results, mysql export view ddl, php mysql tabel view, mysql restrict access, mysql crontab email results, asterisk a2billing mysql create view, php mysql edit view script

About the Employer:
( 59 reviews ) huntley, Canada

Project ID: #16995010

Awarded to:

yongyong2014

Hi Dear, I can complete this job in a hour. I'm an expert in sql(MySQL, SQL Server) for 9+ years. I already thought how to implement this. thank you

$30 USD in 0 days
(2 Reviews)
2.0

16 freelancers are bidding on average $33 for this job

bjrupani

Hello hiring member i am bhavika i have done this types job in my past so i can do it now so please give me chance to serve you thanks in advance :)

$30 USD in 0 days
(49 Reviews)
5.1
Agiletechstudio

Hi, there i read your initial requirements and i have some question regarding to your RESTRICT VIEW RESULT [login to view URL] can we discuss it on chat ?

$25 USD in 1 day
(23 Reviews)
4.9
jayesh793

Hello Sir, Hope you are doing great! I read your requirement about need of --------- developer and I want you to know that I have a decent experience in PHP, WordPress, Laravel, javascript, bootstrap, HTML and More

$20 USD in 3 days
(20 Reviews)
4.9
jagankolkata

I can do your MySQL task as per the description, please contact to discuss in detail and move further, thanks. Relevant Skills and Experience MySQL

$50 USD in 1 day
(28 Reviews)
4.5
talhaghaffar92

Hi There, I have reviewed your requirements for your project and understood it. We have hands on experience for your project and we want to work long term! You can check our reviews and read about us, we provide sat More

$88 USD in 1 day
(7 Reviews)
4.6
akwebtechnology

Dear Sir, I am an independent freelancer having experience of more than 8 years. I am highly experienced in php, html, css, javascript, jQuery, Ajax, Codeigniter, bootstrap etc. I believe the website has been deve More

$20 USD in 1 day
(28 Reviews)
4.5
mohanedmagdii

Hey Sir, I am interested in your project.I am good with MySQL and I can help you with your project and I am ready to start the work right now, and will deliver with good result to you. please send me a message so th More

$25 USD in 1 day
(15 Reviews)
3.4
reedsystems

Hi, how are you today? I read your request and I understand the requirement. I can either modify the view or provide a query that will perform the filtering.

$40 USD in 1 day
(6 Reviews)
3.3
sreenivas2903

Hi can we discuss and fix it

$35 USD in 3 days
(2 Reviews)
2.6
raneemmazen

hello there, I am Raneem and it will be my pleasure to work with you. I have an outstanding experience in both frontend and backend development and a good knowledge of PHP so I can handle any website using this lan More

$55 USD in 3 days
(2 Reviews)
1.3
parbhakarheman

A proposal has not yet been provided

$25 USD in 1 day
(2 Reviews)
1.3
qualityteam19

A proposal has not yet been provided

$10 USD in 3 days
(1 Review)
0.6
shwetankit

Dear Sir, I would like to discuss few thing for better understanding of [login to view URL] share details and ping me for further discussion. Spare a moment on our previous work [login to view URL] http://profeenlinea. More

$30 USD in 1 day
(0 Reviews)
0.0
keanyitooi

Hello there. Thank you for your time to view my proposal. I have gone through your job posting and I am very much interested in the job with the requirements you have set. I believe I have the right set of skills More

$30 USD in 1 day
(0 Reviews)
0.0
Faheem465

Hi, Hope you will be fine and doing well in your field. I read the job details and sure that I can help you in this task. I have experience in MS SQL Server. Waiting your response to work with professionals More

$15 USD in 1 day
(0 Reviews)
0.0