Date/time handling in web applications

Date/time calculations can be perform either on database side or in your server side language (PHP, ASP, C#) or even in Javascript. We'll try to cover all those scenarios.

When copying and pasting code from this article to your application replace table name (mytable) and field names (posted, dob).

MySQL

Calculating age

SELECT DATE_FORMAT(NOW(), '%Y') - DATE_FORMAT(dob, '%Y') -
(DATE_FORMAT(NOW(), '00-%m-%d') < DATE_FORMAT(dob, '00-%m-%d'))
from mytable AS age

30 days before date

select posted, DATE_SUB(posted, INTERVAL 30 DAY) from mytable

Date plus 30 days

select posted, DATE_ADD(posted, INTERVAL 30 DAY) from mytable

Difference between two dates in days

select posted, DATEDIFF(now(), posted) from mytable

Continue reading Date/time handling in web applications »

Random page background: Halloween edition

Happy Halloween everyone!

Just a little Halloween fun project. To make your website more interesting you can choose to display a random background image for each visitor. Here is how it’s going to look:

Check this live demo. Logon as test/test then logout to . . . → Read More: Random page background: Halloween edition

Displaying World Cup 2014 data with PHPRunner.

This is a just for fun PHPRunner project for all soccer fans out there. Check this live demo first.

This project uses live World Cup 2014 data provided by http://worldcup.sfg.io/ in JSON. PHPRunner project makes the use of this data and if will not work if they website is down for any reason.

Continue reading Displaying World Cup 2014 data with PHPRunner. »

PHPRunner 8.0/ASPRunnerPro 9.0/ASPRunner.NET 8.0

PHPRunner 8.0/ASPRunnerPro 9.0/ASPRunner.NET 8.0 are here. Purchase info and download links.

Click any image to see the full size screenshot.

Major new features

  1. Dashboards
  2. Multiple database connections (part of Enterprise Edition)
  3. Import page with columns mapping
  4. New Printer page/PDF options (portrait/landscape, fit to page, scale)

Continue reading PHPRunner 8.0/ASPRunnerPro 9.0/ASPRunner.NET 8.0 »

How to implement auto-save feature

Some large forms would benefit from having auto-save functionality. We have built a simple auto-save script that your can add to any Edit page in your PHPRunner/ASPRunnerPro/ASPRunner.NET application.

Here is how it looks right after record was saved:

Limitations:

uploaded files are not saved . . . → Read More: How to implement auto-save feature

New features in PHPRunner 7.1, ASPRunnerPro 8.1 and ASPRunner.NET 7.0

We are working on the next version of all our code generation products. We plan to release all three products at the same time and expect all of them to carry the same set of functionality.

Download PHPRunner 7.1 preview

Starting with this update we will offer both 32-bit and 64-bit versions of our software. 64-bit version will solve out of memory issue that may occur while working with  large projects having hundreds of tables and thousands of fields.

Continue reading New features in PHPRunner 7.1, ASPRunnerPro 8.1 and ASPRunner.NET 7.0 »

More custom CSS tricks

These CSS snippets are designed to be pasted to Custom CSS section on Style Editor in PHPRunner/ASPRunnerPro.

Making page background fully transparent

  1. .function-list .rnr-c > *,
  2. .function-list .rnr-s-undermenu > *,
  3. .function-list .rnr-b-vmenu > *,
  4. .function-list .rnr-s-2 > *,
  5. .function-list .rnr-row > *,
  6. .function-list .rnr-toprow > *
  7. {
  8. background-color : transparent !important;
  9. background : transparent !important;
  10. }

Sample screenshot:

Continue reading More custom CSS tricks »

Building a nice looking login page with custom CSS

PHPRunner 7.0 and ASPRunnerPro 8.0 add a new new 'Custom CSS' feature - an easy way to modify the appearance of your pages adding bells and whistles Style Editor doesn't support. Lets see how we can build a custom login page similar to this one:


Continue reading Building a nice looking login page with custom CSS »

PHPRunner 7.0/ASPRunnerPro 8.0

 

Major new features

  1. Add CSS rules manually in Style Editor to build professionally looking pages. Take a look at this customized login page: page background, input controls and Facebook button appearance were adjusted via CSS rules added in Style Editor. Click this image to open sample app in browser.

    Continue reading PHPRunner 7.0/ASPRunnerPro 8.0 »

Validation in PHPRunner and ASPRunnerPro applications

Data validation is very important in web applications. You do not want your users to enter incorrect data. Our web application builders can help you with this.

In this article we cover different validation type starting with built-in validation and making it all the way through to advanced AJAX-based validation.

Client-side validation

Client side validation (Javascript based) provides instant feedback to the user making it a good usability choice.

Built-in validation types

This validation will work if you need to make sure that all required fields are populated or validate a relatively simple data format like US Social Security Number.

Continue reading Validation in PHPRunner and ASPRunnerPro applications »