0

It always gives the error

#1415 : Not allowed to return a result set from a function.

pickup_request is a table; schedule_time is datetime variable and customer_id is the primary key and varchar(45) variable

user2314737
  • 27,088
  • 20
  • 102
  • 114

1 Answers1

0

You need to store the output of all your SELECT queries into variables using INTO + name of variable. In your example SELECT schedule_time INTO @schedule_time

Check also the answers to Why mysql is giving error "Not allowed to return a result set from a function"?

user2314737
  • 27,088
  • 20
  • 102
  • 114