Reputation: 1
so I'm trying to finish my project in MYSQL and in order to succeed I need to create a stored function that can be applied to a query in my DB.
Aboutt my project: I created a database (tables like: Shelters, Pets, Adopters, Adoption_Requests, etc ) for pet adoption at shelters. The database will help match pets with loving homes, making the adoption process smoother for both pets and potential adopters.
Syntax I'm struggling with is attached in the screenshot.
errors: Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'current_date DATE; SET current_date = CURDATE(); SET age_years = TIMESTA' at line 5
I tried running it by chat gpt and online syntax checkers but all I get is a message "your syntax is correct"
Upvotes: 0
Views: 22