Forum Academy Marketplace Showcase Pricing Features

Parametres on MySQL query

Hello, I am new to Bubble and I am facing an error which I don’t know how to handle.


I don’t understand what is causing the syntax error. The same query runs succefully if placed on MySQL Workbench with the “?” replaced by appropriate values.

Also, since I want sqm to have the same value everywhere, is it ok to replace all parameters “sqm 1 - 4” with just “sqm” so that it is less time consuming to setup this parameter when calling this API?

Thank you for any help and suggestions!

It’s pretty tough for forum users to debug these long strings of textual information. One guess would be to try and put parentheses around your ?-1 and ?+1 statements, but that’s just a guess.

Here’s what I do to solve things like this…

  1. Start a new SQL Query
  2. Build it piece by piece and parameter by parameter, using the test values as you go
  3. Isolate the problem statement/parameter
  4. Create a new SQL Query just with that type of statement/parameter. Get it to work in it’s most simple state.
  5. Then you will know how to fix your original query.

Hope that helps. If you figure it out, please post the answer so others can benefit.

Lastly, the answer to your question about replicating parameters. The answer is no - you have to have exactly the same number of parameters as question marks. That’s just how it works. I agree, it’s lame to have to re enter the same value over and over. I have to do that many times in my app too :<