Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

nuSQL no fields

Questions related to nuBuilder Forte Reports and the Report Builder.
Locked
tedeu
Posts: 8
Joined: Fri Jul 27, 2018 4:03 pm

nuSQL no fields

Unread post 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
tedeu
Posts: 8
Joined: Fri Jul 27, 2018 4:03 pm

Re: nuSQL no fields

Unread post 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 ?
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: nuSQL no fields

Unread post by toms »

Increasing max_input_vars might help.
tedeu
Posts: 8
Joined: Fri Jul 27, 2018 4:03 pm

Re: nuSQL no fields

Unread post 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
tedeu
Posts: 8
Joined: Fri Jul 27, 2018 4:03 pm

Re: nuSQL no fields

Unread post by tedeu »

Please some help ?
Thank you!
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuSQL no fields

Unread post by admin »

tedeu,

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

Steven
tedeu
Posts: 8
Joined: Fri Jul 27, 2018 4:03 pm

Re: nuSQL no fields

Unread post 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 ?
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: nuSQL no fields

Unread post 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
tedeu
Posts: 8
Joined: Fri Jul 27, 2018 4:03 pm

Re: nuSQL no fields

Unread post by tedeu »

you are a genius.
The field was tva.
You are a super genious!!!
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuSQL no fields

Unread post by admin »

.
Locked