I got a syntax error in this two parts of my query which are the search and sorting , always return error at or near $1 , can anyone checks please
@Youssef
Not sure if the logic in your ternary is correct but I also see that you have w.id in single quotes.... does that mean that the warehouseselector .value could be a value of w.id? I would suggest adding your logic one step or check for truthiness at a time as the above is a bit confusing and format it line by line for each check. Lastly, I cannot tell if this is located in a js query or something else?
Thanks Scott, it is a sql query , it is fixed when i disabled the prepared statement,
2 Likes