Hello,
I need to replace an old dropdown menu created with DMXzone Ajax Form that allow to show on the same page the content associated with the items/names selected in the dropdown menu.
Example:
dynamic records from a mysql view table;
webpage with two columns;
on the left column there is a dropdown menu with a list of cars (from database);
on the right column the user see the details (from database) of the cars selected in the dropdown menu.
Hello Michele,
You don’t need such an extension (Ajax form) as our frontend tools show data without page refresh… You just add your dropdown as a filter in the server action/query and the data is filtered on change, without having to refresh the whole page.
That’s one of the many things that make front end frameworks like app connect great.
So you filter the server connect query based on the content of the select field?
Filtering a table based on a text field I do all the time but don’t get how to filter a dynamically populated select field in the same way. Will have to have a play, maybe I’m missing something here. May have to drag myself out of bed I guess
Here’s how to filter a query using a text field: Filtering Database Query with a Text Input - for the dropdown filter the concept is the same, you just probably need to use “euqal” filter if you want to show a specific record (not contains as with the text field)
No @Teodor Appconnect is not a framework. It is only a tool for kids, amateur self-called developers or some old guys who think they are doing something important.
Hi Teodor,
unfortunately I’m stuck on the query.
If I try to create a query from a “mysql views” I receive an error.
Instead if I use a mysql table and not a “view”, the query works good.
The problem is only on the remote host (Plesk 17.8.11, Debian 9.5, PHP 7.2.11), instead on localhost works good (I’m using MAMP on a macOS 10.14, PHP 7.2.8, MySQL 5.7.23) so I think is missing some configuration on the remote server but I don’t know which it it.
Do you have an idea about it?
Thanks!
{"code":"HY000","file":"\/var\/www\/vhosts\/website.com\/wappler.website.com\/dmxConnectLib\/lib\/db\/Connection.php","line":82,"message":"SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared","trace":"#0 \/var\/www\/vhosts\/website.com\/wappler.website.com\/dmxConnectLib\/lib\/db\/Connection.php(82): PDOStatement->execute()\n#1 \/var\/www\/vhosts\/website.com\/wappler.website.com\/dmxConnectLib\/modules\/dbconnector.php(67): lib\\db\\Connection->execute('SELECT `id_jobs...', Array)\n#2 \/var\/www\/vhosts\/website.com\/wappler.website.com\/dmxConnectLib\/lib\/App.php(159): modules\\dbconnector->select(Object(stdClass), 'rsJobsView')\n#3 \/var\/www\/vhosts\/website.com\/wappler.website.com\/dmxConnectLib\/lib\/App.php(128): lib\\App->execSteps(Object(stdClass))\n#4 \/var\/www\/vhosts\/website.com\/wappler.website.com\/dmxConnectLib\/lib\/App.php(98): lib\\App->execSteps(Array)\n#5 \/var\/www\/vhosts\/website.com\/wappler.website.com\/dmxConnectLib\/lib\/App.php(71): lib\\App->exec(Object(stdClass))\n#6 \/var\/www\/vhosts\/website.com\/wappler.website.com\/dmxConnect\/api\/Data\/records-view.php(8): lib\\App->define(Object(stdClass))\n#7 {main}"}
Yes I confirm that it’s a mysql bug (is necessary turning off “prepared statements”).
A question for Teodor, how can I turn off “prepared statements” in the recordset generated from Wappler?