When using an ALIAS to join two tables, query is not saved and has issues displaying the ALIAS values

  1. Before reporting, make sure you have the latest version of Wappler.
  2. Make sure you have searched the forum first for similar issues being reported
  3. If it is a general web related issue - do a Google Search first
  4. Issue tracker is only for bugs and feature requests, in English only.
  5. Learn how to report bugs effectively

======== TEMPLATE BUG FORM ========

Wappler Version : 4.2.2
Operating System : Windows 10
Server Model: Php
Database Type: MySql
Hosting Type: LAMP

Expected behavior

What do you think should happen?
Creating a query and it works nice.
Editing the query and using an ALIAS to connect two tables together. Using also an ALIAS for the column that I want to display. The query should be able to be saved, and the column to be able to be binded.

Actual behavior

When saving the query, I don’t get a message that the Query has been saved. From the inspector I get a message that the file has been uploaded. The column used as an ALIAS in not shown. Hitting the edit query button does nothing. Restarting Wappler, it permits edit the query again, but all the ALIAS is lost.

How to reproduce

Create a query, use an ALIAS to join two tables

Just to let you know that this issue exists in 4.3.0 too.

Thank you

Hello,
is this issue fixed? I tried to use the same table twice (using an allias) but the same issue exists. Query is not available for binding, plus it can be edited. I am using the latest stable version. Should I try the beta?

Thank you!

I tried to fix this by creating VIEWS.
Data is accessible now but the issue now is that, if I use ALIAS for the table rows, the query can not be edited. Clicking the ‘Query Options’ button does nothing. Thank you!

PS. Just for testing, I created a very simple query and created an ALIAS for the table row and the same issue occurs.

Sorry for multiple posting but is there any workaround on this? It actually doesnt work and it is very important to be able use ALIAS. Does anybody else has this issue? Is it possible that I am doing something wrong? Thank you!

This is what it saves when using ALIAS on table rows
<?php
require(’…/…/…/…/dmxConnectLib/dmxConnect.php’);
$app = new \lib\App();
$app->define(<<<‘JSON’
{
“name”: “”,
“module”: “auth”,
“action”: “restrict”,
“options”: {
“provider”: “security”
}
}
JSON
);
?>

Sorry Niko but i am not sure i understand what exactly are you doing.
Can you try to explain this a bit more clear?
You just join two tables and set aliases for them, correct?
What is wrong after that?

Hello Teo,
even if you try to create a single table query and add an ALIAS name to the table row it wont work. At least to me it causes issues. Try to create a simple query and add an ALIAS name to the table row. Click ok. The try to edit the query. You ll notice that it is not possible. Hope I helped. If not just le me know. Thank you!

You add an alias for a database column in the query builder like that:

If that’s so - i did the same. Then edited them, also ran the server action in the browser - no issues.

I will check it out. I am doing exactly the same thinkg :frowning: I am using the latest stable version 4.9.1
Thank you Teo!
Will let you know.

What database are you using?
What server model?

Please restart wappler in debug mode and recreate the issue, attach the debug log here.

LAMP, since it is working for you I will try to check what it going on with my system here. Will let you know. Thanks!!

Well please do so then:

I get no error!! It just doenst work… I will unistall Wappler and reinstall.
Thank you!!

No Niko, i am not asking you if you get an error.
I just need you to restart Wappler in debug mode, do the same thing you reported and send us the debug log …

This is what I get…

OS info

  • Operating System : Windows 10.0.19044
  • Wappler Version : 4.9.1

Problem description

Steps to reproduce

Please attach the debug log to this topic.

Teo thank you very much. I will reinstall. This is so incredible weird!!! If I use an ALIAS the query just doesnt work nor I can edit it. Don’t want to be wasting your time. When I have something I will let you know. Thank you!!

Niko, once again - we need the DEBUG LOG to see why is it not working!
Just follow the article i provided and simply attach the debug log to this topic after you recreate the issue in debug mode!

report1654524862844.zip (86.1 KB)