Sponsored Content
Top Forums Web Development Notes with Ravinder on Badging System Development Part II Post 303028191 by Neo on Tuesday 1st of January 2019 01:04:01 PM
Old 01-01-2019
Hey Ravinder.

If I were you, I would do this query:

Code:
mysql> select joindate from user where userid =1;

Take that result subtracted from today in UNIXTIME and divide by the number of seconds in year.

That gives you the number of years a person has been a member.

You don't need that fancy MySQL query with all the date / time functions for such a trivial requirement.

As you are beginner in programming, keep it simple... well, I suggest you keep it simple all your life; it's easier to debug or change when you look at the code in 10 years..... keep it simple. Do not be seduced by fancy queries and logic which look cool.... like many programmers and tech people do.

Keep it simple so that a 10th grader can understand it.
 

3 More Discussions You Might Find Interesting

1. What is on Your Mind?

New Badging System - Badges Prototype Beta 1 (Badges Only)

Today I mapped out the new badging system using FA icons, Beta 1 in no particular order except a 6 x 8 grid: https://www.unix.com/members/1-albums215-picture991.png The prototype HTML code for this layout: <style> .fa-badge-grid { font-size: 1.5em; } .row { ... (38 Replies)
Discussion started by: Neo
38 Replies

2. What is on Your Mind?

Status of Badging System - Beta 1

Dear All, Here is the current status of the badging system: The Beta 1 phase of the new badging system is close to completion. 42 prototype badges have been "allocated" 6 prototype badge slots are held in reserve The "alert you have new badges" prototype is running and is currently... (4 Replies)
Discussion started by: Neo
4 Replies

3. What is on Your Mind?

Badging System: UNIX.COM Bug Hunter Badge (New)

I have moved the bug badge out of reserve and into the main stream. Basically, I will assign a color level like the others, based on who has made a good actionable bug report for UNIX.COM. "Good" means screenshots, links, and even details from web dev tools our the HTML source code. So far,... (0 Replies)
Discussion started by: Neo
0 Replies
DANCER(1p)						User Contributed Perl Documentation						DANCER(1p)

NAME
dancer - helper script to create new Dancer applications SYNOPSIS
dancer [options] -a <appname> OPTIONS
-h, --help : print what you are currently reading -a, --application : the name of your application -p, --path : the path where to create your application (current directory if not specified) -x, --no-check : don't check for the latest version of Dancer (checking version implies internet connection) -v, --version : print the version of dancer being used DESCRIPTION
Helper script for providing a bootstrapping method to quickly and easily create the framework for a new Dancer application. EXAMPLE
Here is an application created with dancer: $ dancer -a mywebapp + mywebapp + mywebapp/bin + mywebapp/bin/app.pl + mywebapp/config.yml + mywebapp/environments + mywebapp/environments/development.yml + mywebapp/environments/production.yml + mywebapp/views + mywebapp/views/index.tt + mywebapp/views/layouts + mywebapp/views/layouts/main.tt + mywebapp/lib + mywebapp/lib/mywebapp.pm + mywebapp/public + mywebapp/public/css + mywebapp/public/css/style.css + mywebapp/public/css/error.css + mywebapp/public/images + mywebapp/public/500.html + mywebapp/public/404.html + mywebapp/public/dispatch.fcgi + mywebapp/public/dispatch.cgi + mywebapp/public/javascripts + mywebapp/public/javascripts/jquery.js + mywebapp/Makefile.PL + mywebapp/t + mywebapp/t/002_index_route.t + mywebapp/t/001_base.t The application is ready to serve: $ cd mywebapp $ ./mywebapp.pl >> Listening on 127.0.0.1:3000 == Entering the development dance floor ... AUTHOR
This script has been written by Sebastien Deseille <sebastien.deseille@gmail.com> and Alexis Sukrieh <sukria@cpan.org>. SOURCE CODE
See Dancer for more information. LICENSE
This module is free software and is published under the same terms as Perl itself. perl v5.14.2 2012-04-03 DANCER(1p)
All times are GMT -4. The time now is 02:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy