show_notification({"message":"Too many tables; MariaDB can only use 61 tables in a join

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

show_notification({"message":"Too many tables; MariaDB can only use 61 tables in a join

Post by D Oliveira » 2018-06-11 21:25

While developing the schedule system I have encountered an issue and did not find a solution, after many lookup fields it seems appgini cannot successfully build the application.

see attached screenshots, after the user select the lookup fields for the trucks an pdf is generated, untill truck#4 it was working fine. Need help ASAP.

https://ibb.co/ch0jYT
https://ibb.co/eaQJtT
https://ibb.co/kxbf7o

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: show_notification({"message":"Too many tables; MariaDB can only use 61 tables in a join

Post by pbottcher » 2018-06-12 07:13

Hi,

I think this is not really an appGini issue, it is rather an design issue. The limit for the joins is coming from the DB (61 Joins).
If you create for each truck around 12 lookup fields (each lookup field generates at least one join) you can handle aprox. 5 trucks like this.

can't you add a truck-id and have the information required per each truck-id?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

Re: show_notification({"message":"Too many tables; MariaDB can only use 61 tables in a join

Post by D Oliveira » 2018-06-12 12:50

Hello, thanks for the reply, yes I can do it separately with ajax calls but then it starts a guessing game to find which installers are in which trucks, I guess thats the only way to go, the only thing though is that neither $j.(#id).val() nor select2 are changing lookup dropdown fields values, any ideas on that? thank you

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: show_notification({"message":"Too many tables; MariaDB can only use 61 tables in a join

Post by pbottcher » 2018-06-12 13:10

Sorry I don't get the question on

" ....neither $j.(#id).val() nor select2 are changing lookup dropdown fields values"

Can you make it more preceise, or an example?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

Re: show_notification({"message":"Too many tables; MariaDB can only use 61 tables in a join

Post by D Oliveira » 2018-06-12 18:33

Question is, how to change the lookup dropdown values with js. I am leaving all the 12 fields for each truck (theyre not lookup anymore, just regular fields) locked with read-only just to store the data coming from the selection (hopefully).

Code: Select all


$j('#truckselection').on('change', function(){

     if($j('#truckselection').val() == 'TRUCK 1'){

          console.log('TRUCK 1 --------------------');
          console.log($j('#t1i1').val()); // output works, printing ANDERSON
          
          $j('#truckselectioni1').val($j('#t1i1').val()); // attempt 1 failed to work

          jQuery("#truckselectioni1").select2("val", $j('#t1i1').val()); //  attempt 2 failed to work

     }


});


User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

Re: show_notification({"message":"Too many tables; MariaDB can only use 61 tables in a join

Post by D Oliveira » 2018-06-12 18:58

#truckselectioni1 is a lookup dropdown (installers name list, separate table) and t1i1 is the field locked with read-only ( going to be used to store the data for installer 1 in truck1)

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: show_notification({"message":"Too many tables; MariaDB can only use 61 tables in a join

Post by pbottcher » 2018-06-12 21:21

Hi,

you can try

Code: Select all

$j('#truckselectioni1').val($j('#t1i1').val()).trigger('change')
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

Re: show_notification({"message":"Too many tables; MariaDB can only use 61 tables in a join

Post by D Oliveira » 2018-06-12 21:23

pböttcher wrote:
2018-06-12 21:21
Hi,

you can try

Code: Select all

$j('#truckselectioni1').val($j('#t1i1').val()).trigger('change')

not successful sadly, thanks for trying, this is really making me mad like why isn't it behaving like a regular dropdown

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: show_notification({"message":"Too many tables; MariaDB can only use 61 tables in a join

Post by pbottcher » 2018-06-13 08:18

Hi,

ok after digging a little bit more, can you try

Code: Select all

$j('#truckselection').on('change', function(){

     if($j('#truckselection').val() == 'TRUCK 1'){

          console.log('TRUCK 1 --------------------');
          console.log($j('#t1i1').val()); // output works, printing ANDERSON
          AppGini.current_truckselectioni1.value=$j'#t1i1').val();
          truckselectioni1_reload();
}
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

Re: show_notification({"message":"Too many tables; MariaDB can only use 61 tables in a join

Post by D Oliveira » 2018-06-13 13:52

brilliant! it worked! thank you for the help, that was really insightful

Post Reply