Page 1 of 1

nuSQL no fields

Posted: Fri Jul 27, 2018 4:15 pm
by tedeu
Hi,
I used the SQL Builder and build a relationship between two tables.
Table A and table B
The table B is a subform for table A.
Then i linked the Custom_field_id from table B to ID of Table A.

It gave me this SQL

Code: Select all

SELECT
    Table_A.*,
    Table_B.*

FROM
    Table_A
        JOIN Table_B ON Table_B.Custom_field_id = Table_A.id

And when i go to Fast Report
Select Table data the SQL i just build (it's a nuSQL), all i have in the Available Fields is KEEP EXACT HEIGHT


And on the debugger i get this error code:

Code: Select all

[0] : 
===USER==========

globeadmin

===PDO MESSAGE=== 

SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'appsgesa_nugesa.___nu15b5b28b33b413___'

===SQL=========== 

DROP TABLE ___nu15b5b28b33b413___

===BACK TRACE====

/home/appsgesa/public_html/nucommon.php - line 1001 (nuRunQuery)

/home/appsgesa/public_html/nucommon.php(1267) : eval()'d code - line 2 (nuTTList)

/home/appsgesa/public_html/nucommon.php - line 1267 (eval)

/home/appsgesa/public_html/nuform.php - line 475 (nuEval)

/home/appsgesa/public_html/nuform.php - line 499 (nuGetOtherLookupValues)

/home/appsgesa/public_html/nuapi.php - line 43 (nuGetAllLookupValues)
***EDIT***
I took the statement

Code: Select all

SELECT
    Table_A.*,
    Table_B.*

FROM
    Table_A
        JOIN Table_B ON Table_B.Custom_field_id = Table_A.id
I paste it into phpmyadmin SQL and runned it.
The result was ok.

I can't understand why the behavior.

please help

Re: nuSQL no fields

Posted: Fri Jul 27, 2018 4:46 pm
by tedeu
I think i have discovered the error.
My problem is that i have 20 columns in first table and 40 columns in the secondth table.
When i select fewer columns, from sql builder, they show.
How can i make it so they will all show.
Do I have to modify something to the server ?

Re: nuSQL no fields

Posted: Fri Jul 27, 2018 5:07 pm
by toms
Increasing max_input_vars might help.

Re: nuSQL no fields

Posted: Fri Jul 27, 2018 9:25 pm
by tedeu
It was 1000 i set it to 100000
Still not working.

Any other ideas please?
Thank you!

Edit
Forgot to say
I am using selfhosted
Centos7 centos webpannel

Re: nuSQL no fields

Posted: Tue Jul 31, 2018 10:43 am
by tedeu
Please some help ?
Thank you!

Re: nuSQL no fields

Posted: Thu Aug 02, 2018 12:29 am
by admin
tedeu,

I would reduce the number of fields being returned. (You mentioned it ran OK then)

Steven

Re: nuSQL no fields

Posted: Mon Aug 06, 2018 3:01 pm
by tedeu
yes, but i need the all.
I even configured a bigger server with 6CPU and 8GB ram.
Still nothing
What to do please ?

Re: nuSQL no fields

Posted: Mon Aug 06, 2018 3:49 pm
by toms
Hi,

The reason could be that two fields with the same name exist in the tables.
E.g. table A contains a field named "lastname" and table B also contains a field "lastname". Try using aliases.
At least that's how it works for me when I select 80+ fields.

Code: Select all

SELECT
    Table_A.field_1 as field_1_alias,
    Table_A.field_2 as field_12_alias,
    Table_A.field_3 as field_13_alias,

    .....

    Table_B.*

FROM
    Table_A
        JOIN Table_B ON Table_B.Custom_field_id = Table_A.id

Re: nuSQL no fields

Posted: Mon Aug 06, 2018 4:31 pm
by tedeu
you are a genius.
The field was tva.
You are a super genious!!!

Re: nuSQL no fields

Posted: Tue Aug 07, 2018 4:07 am
by admin
.