×
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!
Retrieving data from database
|
01-22-2019, 01:55 PM
Replace your entire valid until input with this...
https://pastebin.com/q1hTFLmJ
hmm...somehow it doesn't want to update the date of the validity column any more.
No idea why... It did before I'll try to fix that, your code will probably work then. I have entered the date manually into the validity column of that user. It shows up in the form now...but no expiry date is displayed I'm afraid. (01-22-2019, 02:12 PM)LBC Wrote: hmm...somehow it doesn't want to update the date of the validity column any more. After removing the entire bit you posted on pastebin....I can update the validity column again. Isn't that weird? It does work with the old code though. This one: <?php if($user->data()->membership == '5cc'){ $length = 6; }elseif($user->data()->membership =='10cc'){ $length = 12; } if(isset($length)){ echo date('Y-m-d', strtotime("+".$length." months", strtotime($user->data()->validity))); } ?> It just does not seem to work inside a label. Hah! Who knew!
01-22-2019, 03:27 PM
Any thoughts on how to convert the output date to dd-mm-yyyy?
Thanks a lot for all your troubles today Mudmin. I very much appreciate it. I've learned a lot today
01-22-2019, 03:28 PM
Glad to help.
Sure. Just switch "Y-m-d" to "d-m-Y"
03-26-2019, 08:00 AM
Hello!
Is it possible to somehow use this code to display the names of the people who have booked at a certain day? Like, displaying the first and last names of everyone who booked on Monday and Wednesday and Friday and Sunday? The days are stored in either the regular_days or random_days in the users table. Or would I have to have a completely different kind of function for this? Do you have any tips? |
Users browsing this thread: 3 Guest(s)