Whats worng with this? keeps showing no data

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
arcanebits
Veteran Member
Posts: 104
Joined: 2018-12-10 21:52

Whats worng with this? keeps showing no data

Post by arcanebits » 2022-06-22 17:06

This is the sql of a lookup field
***************
SELECT `Provincia`.`id`, `Provincia`.`Provincia` FROM `Provincia`
WHERE `Provincia`.`pais` = `Usuario.`Pais` ORDER BY 2
***************
`Usuario.`Pais` its also a lookup field. thats seeks into a pais db get the name and done.

Any help is more than welcome.
a3

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Whats worng with this? keeps showing no data

Post by jsetzer » 2022-06-22 17:28

(1) There is a quote missing here:

Code: Select all

WHERE `Provincia`.`pais` = `Usuario.`Pais`
(2) Table `Usuario` is not known. If there is a relation between `Provincia' table and `Usuario` table you need to join that second table
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

arcanebits
Veteran Member
Posts: 104
Joined: 2018-12-10 21:52

Re: Whats worng with this? keeps showing no data

Post by arcanebits » 2022-06-24 14:32

Thanks a lot Jsetzer you have a quite sharp eye! thank I fixed the first mistake. In the try of fix the second i read some mysql and trired my best, the end result is not as expected.
What im trying to accomplish its to make the usual data gathering based on geopolitical divisions, as Country>State>County. Where the User DB gets the country of CountryDB via lookup, then the State is another lookup based on your previous CountryLooup and so on... so I have CountryDB StateDB CountyDb....
I can only get to work the first lookup (country) from there I get weirds results.
I have attached a image showing the web image with the two querrys i have tried after some reading.
Any tip is more than welcome.
a3
Attachments
toAppginiForums_24-06--2022_9-04-20.png
toAppginiForums_24-06--2022_9-04-20.png (106.91 KiB) Viewed 865 times

arcanebits
Veteran Member
Posts: 104
Joined: 2018-12-10 21:52

Re: Whats worng with this? keeps showing no data

Post by arcanebits » 2022-06-25 14:33

It seems that what i was triying to achieve was OVERKILL and AppGini, no code requied had a solution... and its this.
https://www.youtube.com/watch?v=ySABQLupBRs&t=52s

Thanks to Jsetzer who is truly an AppGini Hero!

Post Reply