Question
how to do search function in javascript? i am currently doing restaurant review what do i need to put inside my index html, css style,
how to do search function in javascript? i am currently doing restaurant review
what do i need to put inside my index html, css style, and javascript
my sql
`_id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(80) NOT NULL, `story` TEXT(1024) NULL, `thumb` VARCHAR(255) NOT NULL, `contact` VARCHAR(30) NULL, `menu` VARCHAR(255) NULL, `location` VARCHAR(90) NOT NULL, `average_price` VARCHAR(30) NULL, `rating` INT NOT NULL, `category` VARCHAR(30) NULL, `opening_hours` VARCHAR(100) NOT NULL, `poster` VARCHAR(255) NOT NULL, `area` VARCHAR(50) NOT NULL,
this is my api route
app.route('/login').post(userinformationController.verifyUserLogin)
app.route('/userinformation').get(userinformationController.getAllUserInformation)
app.route('/userinformation').post(userinformationController.addUserInformation)
app.route('/userinformation/:id').put(userinformationController.updateUserInformation)
app.route('/userinformation/:id').delete(userinformationController.deleteUserInformation)
app.route('/restaurants').get(restaurantController.getAllRestaurants) // activate the getAllRestaurants method if the route is GET(method) /restaurant
app.route('/deals').get(dealsController.getAllDeals)
app.route('/comments').get(commentController.getAllComments) // activate the getAllComments method if the route is GET(method) /comments
app.route('/comments').post(commentController.addComment) // activate the addComments method if the route is POST(method) /comments
app.route('/comments/:id').put(commentController.updateComment) // activate the updateComments method if the route is PUT(method) /comments/:id
app.route('/comments/:id').delete(commentController.deleteComment)// activate the deleteComment method if the route is DELETE(method) /comments/:id
app.route('/favourites').get(favouritesController.getAllFavourites)
app.route('/favourites').post(favouritesController.addFavourites)
app.route('/favourites/:id').delete(favouritesController.deleteFavourites)
app.route('/searchRestaurants').post(restaurantController.searchRestaurant)
app.route('/filterRestaurants').post(restaurantController.filterRestaurant)
app.route('/filterComments').post(commentController.filterComment)
app.route('/email').post(restaurantController.sendEmail)
i want the search to be able to search all the restaurants by their name
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started