Skip to content
Advertisement

MariaDB loop not displaying results of query

I have a simple query:

Which results in:

When I try to include in a while or for loop:

I get no output other than:

Is there something else I’m misssing? thank you.

Advertisement

Answer

Why do you want to use a loop? This is much better to do as a simple query:

If you want specific users, you can use a WHERE clause:

Note: I don’t think the JOIN is necessary.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement