Insert manually query

I would like to manually edit a query, because with the Wappler builder I can not set it as I would like. Where am I going to change?

You cannot do that - we do not support manually altering queries.
What are you trying to achieve, that you cannot do in Wappler?

SELECT bt_tratte.id_tratta, bt_tratte.attivo, first.stazione AS partenza, second.stazione AS Arrivo FROM bt_tratte inner join bt_stazioni AS first ON first.id_stazione = bt_tratte.id_partenza inner join bt_stazioni AS second ON second.id_stazione = bt_tratte.id_arrivo

Which part of this you cannot do in Wappler exactly?

The problem is that I have to invoke the same external table twice (alias first / second) but Wappler correctly creates the first one but with the second one… problem

Maybe @patrick should check if this can be improved in query builder :slight_smile:

Ok if you solve let me know Thanks

You you already as many joins on the same table as you wish. Just give it an alias indeed in the join popup window.

Just make sure you save the query dialog on each new join and reopen it to add more for now.

We will improve this

1 Like

Ok I had not thought about saving after every query statement
Now I try if everything works
Thank you

Although this is not neccesary anymore just mentioning as an alternative in case someone is having issues with using the same table multiple times.
Do this.
1.Create a view in your phpMyAdmin for the table you want to reuse
2.Revaluate your connection within Wappler so it loads the new changes
3.Use the view create to a join with the same table twice

Thanks

@t11 @Marzio we’ve fixed this issue and the fix will be included in today’s update.
No need of view for this any longer :slight_smile:

Ok Thank you all . I try

1 Like

haha, yeah, thank you Wappler, looking so forward to it

1 Like