The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retrieving data from database
#11
Absolutely. Happy to help. If any of it doesn't make sense, let me know. I can help with the sign up or whatever you need.
  Reply
#12
(01-04-2019, 10:22 AM)mudmin Wrote: Absolutely. Happy to help. If any of it doesn't make sense, let me know.  I can help with the sign up or whatever you need.

How would I go about it to get it like this:

Monday: 4
Tuesday: 6
Wednesday: ..
Thursday: ..
Friday: ..
Saturday: ..
Sunday: ..

Is there a line of code that i can just paste anywhere?
  Reply
#13
Sure. Get rid of the entire table from <table to /table and paste this
https://pastebin.com/n0v0hQTC
  Reply
#14
Wow! So simple...geeze Blush 

I'll definitely get back to you for that sign up, but I'm going to try it by myself first.

Thanks again mudmin!
  Reply
#15
Sure. No problem at all. And that's definitely the benefit of defining the days and writing that function. Once you have it, you can really do whatever you want with it.
  Reply
#16
Hello Mudmin,

Would it be possible to drop the weekday and just display the number of that particular weekday somewhere?
Like...hide the weekday or something?

I would like to display the number of spots available in a table.
Something like this:

Day                 | Time     | Activity | Spots available
Wednesday     | 19:00   | yoga     |  3
Friday              | 10:00   | yoga     |  5
  Reply
#17
Let me see if I can help you a little better.
When I see that table, you're going from Wed to Friday. Are you saying that you want to only show days that have availability?

So Thursday has no days available, so it's skipped?

Also, do you expect to have multiple activities?
  Reply
#18
no no, this was just a quick example.

It should be all days of the week...showing availability of each weekday.
And yes, there will be several activities (Eventually). I will have to add extra columns to the users table for that.

What would be great if I could just echo the availability numbers of any particular event anywhere i want Smile
  Reply
#19
Ok. So the way you're doing it will make it a little trickier to be more dynamic. Like what if you don't want to offer any dodgeball on Sundays or something like that? Do you want help making it dynamic?
  Reply
#20
(01-10-2019, 09:58 AM)mudmin Wrote: Ok.  So the way you're doing it will make it a little trickier to be more dynamic.  Like what if you don't want to offer any dodgeball on Sundays or something like that? Do you want help making it dynamic?

Or I can just write the function to edit the table.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)