Custom query not displaying results

hi, not sure if I am being a dullard, but I have a page setup that worked just fine with a query built using “simple query” builder. But I needed to use some views so used custom builder.

my query works perfectly when run in the query builder, I get the correct data set.

i attach screen shot showing the query and its result set (1 row). A screenshot showing my server connect front end and using the server connect and the repeat region with the data points in the page.

loading the page just says “server error” :frowning:

thanks

i also just rebuilt the query using the query builder, again i get the same results set when viewing data set in query builder, but get a 500 error on the front end, i have looked at the debugger its basically a 500 error, i have a filter on it, but that has worked in past before i changed to a view, but i also removed the filter to see if it fixed the 500 error and it didnt

Hey @JamesJenkins

  1. Do you have the debugger on?

Please screenshot the error in console

i do have it on, screenshot here

You have a $_GET variable filter?

yeah, I have a small drop down on the top to filter clients that are active/inactive (sends 1 or 0).

  1. can you shcreenshot the parameters on your builder?

  2. the dropdown has a default value? In order to send a value to the api on page load?

the drop down/filter worked all good before changing query to using views, its a select list that sends 0 or 1, but it all has worked fine until changing the query to use the views

As explained on the link i posted, click Preview to see the exact error.

1 Like

This condition protects the serveraction from failing if a Get variable is not set…

In your database connection settings is the Prepare Statements option set to true or false?

set to auto

Just set this option to true and save the database connection.

1 Like

that got it, working now. is that something special to using a view? as never had that before

and thanks , would never ever ever have found that