01-04-2019, 09:02 AM
Hello
I am (still) not very well versed in php at all, but I fiddle with it anyway. I'll try to explain what I want to do.
I added a column to the users table named day. Every user has a day of the week in their profiles which is stored in that column.
Now I would like to show on a public page (in a sort of calendar) the number of people who have Monday or Tuesday, etc.
So if there are 5 users with Monday in their profile, I would like to show the number 5 on that calendar page (preferably on Monday).
If there are 2 people who have Wednesday in their profile, it shows 2 on the calendar page.
I'm sure something like that should be possible, but I cannot seem to get it right in UserSpice.
I think it probably should look like this more or less: $query = $db->query("SELECT * FROM users WHERE day = monday",array($day));
But then I don't know how to show/echo the results
Can anyone please give me a hand with this?
I am (still) not very well versed in php at all, but I fiddle with it anyway. I'll try to explain what I want to do.
I added a column to the users table named day. Every user has a day of the week in their profiles which is stored in that column.
Now I would like to show on a public page (in a sort of calendar) the number of people who have Monday or Tuesday, etc.
So if there are 5 users with Monday in their profile, I would like to show the number 5 on that calendar page (preferably on Monday).
If there are 2 people who have Wednesday in their profile, it shows 2 on the calendar page.
I'm sure something like that should be possible, but I cannot seem to get it right in UserSpice.
I think it probably should look like this more or less: $query = $db->query("SELECT * FROM users WHERE day = monday",array($day));
But then I don't know how to show/echo the results
Can anyone please give me a hand with this?