Homework

Homework Questions? Ask a Tutor for Answers ASAP

Ask an Expert,
Get an Answer ASAP!

Homework
This answer was rated:

For "The Doctor" Extend the recipe application (link to

For "The Doctor" Extend the recipe...
For "The Doctor"

Extend the recipe application (link to files below) to allow users to rate and comment on recipes. Your application should:
Allow each user to post one rating (1–5 scale), with a short comment, for each recipe
Calculate number of ratings for each recipe
Calculate the average rating for each recipe
Display all ratings and comments for a particular recipe
Display the number of ratings and the average rating for each recipe in the recipe directory
Before you write any PHP code, create a table to store the comments and ratings. Based on the requirements above, the table needs fields that identify the user and the recipe, their rating and comment. You should not store the number or average rating for a recipe, but rather calculate these values when necessary. Consider including the date of submission and possibly other fields. Although a user can have only one rating per recipe, each user can rate many recipes, and each recipe may have many ratings. In 1–2 paragraphs, explain how these facts influenced your choice of primary key for this table.

Next, update the PHP application by writing and testing code to:
Allow a logged-in user to rate and comment on a recipe
Allow a user to display the comments on a recipe
Display the number and average rating on the recipe pages
You may find it helpful to structure your code by using PHP functions.

Discuss the design choices you faced and explain the decisions you made (not elaborate). Be sure to address how you ensure that a user cannot rate the same recipe twice and how you handle the average for recipes with no ratings.

Files are located at http://wikisend.com/download/454980/recipes.zip

Thanks!
Show More
Show Less
Ask Your Own Homework Question
Answered in 6 minutes by:
5/14/2013
TheDoctor
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1,757
Experience: M.S. in Internet Information Systems
Verified
Hello again! Thank you for requesting me.

It would be my pleasure to assist you with this. However, such a request is fundamentally high-detail. Any question that requires writing entire scripts of code and creating new database tables is extremely high-detail. A low detail question would be a short answer requiring perhaps 15 - 30 minutes to write up a response. Completing this request will take up to 4 hours of work and the current question value does not justify dedicating that much time.

I will send an under-priced report. You will receive an email with the suggested question value and a link to update the question value.

Thank you
Ask Your Own Homework Question
Customer reply replied 4 years ago

no problem

Thank you.

I will contact you once this is complete.
Ask Your Own Homework Question
Hello again!

You can download the completed project here:

http://wikisend.com/download/168242/allDone.zip

Inside of newTable.txt you will find the sql for the new table. You must run this sql on your database before any of this will work.

The ratings table represents a many to many relationship between recipes and users. Therefore, the ratings table acts as a join table between the users and the recipes with the user_id and the recipe_id acting as identifying foreign keys between the two tables. These two identifying relationships form a compound primary key. A user and a recipe together identifies a rating (hence an "identifying relationship). This forms a compound primary key on the rating table (user_id, recipe_id).

If no ratings have been submitted for a recipe, no rating is supplied. If there have been ratings, then I simply use the AVG and COUNT aggregate functions in MySQL to get the average rating and number of ratings.

If a user is signed in, they can rate a recipe that they did not enter. A user cannot rate their own recipe. Once a rating has been entered, the user will see it whenever they view the recipe. If the user wishes, he can change his previous rating. However, it is impossible to enter more than one rating per recipe. This is accomplished with the ON DUPLICATE KEY UPDATE functionality in MySQL.

I think you will find that this meets all of the requirements and does so quite nicely. I believe your instructor will enjoy the stars on the view_recipe page.

Let me know if you have any questions. I'm here to help.

Please remember to rate my answer. Thank you so much!
Ask Your Own Homework Question
Customer reply replied 4 years ago

Sorry have not had a chance to test yet, but will do so later today and make sure I rate it, thanks for everything.

You are very welcome. I look forward to hearing back from you.
TheDoctor
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1,757
Experience: M.S. in Internet Information Systems
Verified
TheDoctor and 87 other Homework Specialists are ready to help you
Ask your own question now
Customer reply replied 4 years ago
I have downloaded and tried the files, created the table, but I do not see anything about ratings anywhere on the index page, and when I try to load the file view_ratings I get the error:

Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file 'view_ratings.tpl'' in C:\xampp\htdocs\Smarty\libs\sysplugins\smarty_internal_templatebase.php:127 Stack trace: #0 C:\xampp\htdocs\Smarty\libs\sysplugins\smarty_internal_templatebase.php(374): Smarty_Internal_TemplateBase->fetch('view_ratings.tp...', NULL, NULL, NULL, true) #1 C:\xampp\htdocs\Unit5\view_ratings.php(53): Smarty_Internal_TemplateBase->display('view_ratings.tp...') #2 {main} thrown in C:\xampp\htdocs\Smarty\libs\sysplugins\smarty_internal_templatebase.php on line 127
I assure you that it all works without issue. It is saying that it cannot find the file view_ratings.tpl

You can see that the view_ratings.tpl is in the files that I sent you.

Do you have time to do a quick remote session? If so, please go to join.me

Once there, select the big orange button to share your screen. You may be asked to install the software. Select yes to everything and allow access to everything. Once it is running, there will be a small dashboard at the top of your screen. Select the URL/address in that dashboard and copy it. Then paste it into this thread so that I can join you.

Thank you
Ask Your Own Homework Question
Customer reply replied 4 years ago
https://join.me/593-853-492
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.
Ask Your Own Homework Question
Ask TheDoctor Your Own Question
TheDoctor
TheDoctor
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1,757
1,757 Satisfied Customers
Experience: M.S. in Internet Information Systems

TheDoctor is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here.

DianeDallas, TX

< Previous | Next >

Meet the Experts:

LogicPro

LogicPro

Engineer

5,672 satisfied customers

Expert in Java C++ C C# VB Javascript Design SQL HTML

Manal Elkhoshkhany

Manal Elkhoshkhany

Tutor

4,549 satisfied customers

More than 5000 online tutoring sessions.

Linda_us

Linda_us

Finance, Accounts & Homework Tutor

3,138 satisfied customers

Post Graduate Diploma in Management (MBA)

Chris M.

Chris M.

M.S.W. Social Work

2,635 satisfied customers

Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)

F. Naz

F. Naz

Chartered Accountant

2,158 satisfied customers

Experience with chartered accountancy

Bizhelp

Bizhelp

CPA

1,887 satisfied customers

Bachelors Degree and CPA with Accounting work experience

Seanna

Seanna

Tutor

1,781 satisfied customers

3,000+ satisfied customers, all topics, A+ work

< Previous | Next >

Related Homework Questions
I asked a question and will pay but the site asks me to
hi i asked a question and will pay but the site asks me to verify an ammount below 200 usd which i want to but it does not give me the option to do so, please help… read more
GLENN
GLENN
Master of Mathematics
329 satisfied customers
Which if the following is not included unpaid-in capital?
which if the following is not included unpaid-in capital? common stock pain-in capital-donations stock dividend distributable appropriation per loan agreement … read more
F. Naz
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,158 satisfied customers
This question is just for Dr. Kakonge. This purpose is to
Hello. This question is just for Dr. Donna Kakonge.This purpose is to pay the payment to Dr. Donna Kakonge on 06/16/2017 again because of something wrong about payment on 06/16/2017.The question on 06… read more
Dr. Donna Kakonge
Dr. Donna Kakonge
Doctor of Education
187 satisfied customers
A recent survey found that 73% of all adults over 50 wear
A recent survey found that 73% of all adults over 50 wear sunglasses for driving. In a random sample of 20 adults over 50, what is the mean and standard deviation of those that wear sunglasses?… read more
Dr. Donna Kakonge
Dr. Donna Kakonge
Doctor of Education
187 satisfied customers
Is anyone familiar with Excel??? The link below will take
Is anyone familiar with Excel??? The link below will take you to my question. It is due 02/14/10 Sunday night , but the sooner the better. You will see "1: Five-Year Sales Projections" that is what I … read more
Stephen, MBA
Stephen, MBA
Master's Degree
166 satisfied customers
160 Word min.: Consider the internal control process
160 Word min.: Consider the internal control process required by the Sarbanes-Oxley Act. Do you think the expenses of implementing better internal controls are offset by the benefits of having the con… read more
Jane T(LLC)
Jane T(LLC)
Master's Degree
18 satisfied customers
I would ask this in homework but I think this is out of
Hi,I would ask this in homework but I think this is out of their area of expertise. How much to answer these 40 electrician trade school questions from Penn foster. This is their NEC graded project wh… read more
Dr. Donna Kakonge
Dr. Donna Kakonge
Doctor of Education
187 satisfied customers
I have questions on teh fundamental accounting principles
I have questions on teh fundamental accounting principles book nineteenth edition. chapter 11. if you do hit me up… read more
Brittany
Brittany
Bachelor\u0027s Degree
102 satisfied customers
I see you have already done this project but i dont see the
hello i see you have already done this project but i dont see the essay part of it or the brainstorm page it needed done,i am in need of these asap,if you can contact me that would be great,thnx “Evil… read more
O. Adames
O. Adames
Bachelor\u0027s Degree
77 satisfied customers
I need help on how to figure out this problem, I am having
Hello, I need help on how to figure out this problem … read more
GLENN
GLENN
Master of Mathematics
329 satisfied customers
How many words per minute does the average person think? How
Good afternoon, how many words per minute does the average person think? … read more
GLENN
GLENN
Master of Mathematics
329 satisfied customers
Section 1 – Objectives: Provide a brief summary of the
Section 1 – Objectives: Provide a brief summary of the project. • Section 2 – Task 1: Basic Web Tracking Mechanism: Summarize your efforts to investigate web tracking, including the screenshots you to… read more
Dr. Donna Kakonge
Dr. Donna Kakonge
Doctor of Education
187 satisfied customers
I need help implementing expectation maximization algorithm
I need help implementing expectation maximization algorithm in python … read more
Dr. Donna Kakonge
Dr. Donna Kakonge
Doctor of Education
187 satisfied customers
I have 3 more if you want them, i have to pick a heroine,
i have 3 more if you want them, i have to pick a heroine, and do these assignments, let me know, and let me know what its worth, when this one is done, i will send you the other two, and pay seperatel… read more
O. Adames
O. Adames
Bachelor\u0027s Degree
77 satisfied customers
I need help with advanced macroeconomics. I'm having trouble
I'm having trouble with the IS-MP-PC model, showing what would happen if the FFR would be increased, and also if there were to be a tax reform. … read more
Dr. Donna Kakonge
Dr. Donna Kakonge
Doctor of Education
187 satisfied customers
With a minimum word count of 130: Do you believe business
With a minimum word count of 130: Do you believe business enterprise should be regulated by the federal government or that the marketplace should determine price? Explain your response.… read more
Experienced Teacher
Experienced Teacher
Bachelor\u0027s Degree
394 satisfied customers
Is there any help for Linux beginners testout chapter exams.
is there any help for Linux beginners testout chapter exams … read more
Dr. Donna Kakonge
Dr. Donna Kakonge
Doctor of Education
187 satisfied customers
Prepare 10 column work sheet for fiscal year 2005 starting
prepare 10 column work sheet for fiscal year 2005 starting with unadjust trial balance including adjustments on additional facts?… read more
Manal Elkhoshkhany
Manal Elkhoshkhany
Tutor
Foundation classes for MBA
4,549 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x