Thursday, 30 November 2017

MySQL Date Time

In MySQL, it includes set of date and time-related functions for performing manipulation over data which indicate the date, time or both. Using these functions, some common operations taken place are listed below. Getting current Date/Time/Timestamp. MySQL Date/Time formatting. Date/Time/Timestamp arithmetic operations. Converting MySQL Date/Time/Timezone. Extracting date from MySQL Temporal Data. For performing the above operations, MySQL...

PHP Access Modifiers

PHP access modifiers are used to set access rights with PHP classes and their members that are the functions and variables defined within the class scope. In PHP, there are some keywords representing these access modifiers. These keywords will be added with PHP classes and its members. PHP keywords as Access Control Modifiers Now, let us have a look at the following list to know about the possible PHP keywords used as access modifiers. public...

Using jqGrid Control with PHP

jqGrid is very popular and used to manage data with grid user interface. It is provided with the facility of handling dynamic data loaded into the grid. It uses jQuery Javascript library for the grid control operations handled by the use of AJAX calls. It will be integrated with any server-side technologies like PHP, ASP.NET and etc. And, it supports most of the popular databases as such as SQL, MySQL, Oracle and etc. We can integrate twitter...

PHP Change Password Script

Change password feature in a web application is to let the user change their old password at some periodic interval. It makes the user protect the sensitive pages from hackers. Some web application fixes some expiration period for user’s password. It forces the user to change the password once the expiration period is elapsed. For example, some banking applications force users to change the password for security. We are going to see an example to change the password with Javascript validation by, accessing MySQL table. HTML Code for Change...

PHP try-catch

PHP try-catch is implemented with try and catch blocks, as usual. And, try block contains code with the feature of PHP exception handling by throwing exceptions occurred while executing PHP scripts. Such exceptions are caught with PHP catch block. For each try block in a PHP program, there should be minimum one catch block. We can have multiple catch blocks for a try block, to handle various classes of PHP exceptions. PHP try-throw-catch Syntax The following code block shows the usage of try and catch in a PHP program. <?php try{ //...

PHP Predefined Error Constants

Few days before, we have seen about PHP errors which are classified by the time of occurrence, recovery possibilities and etc. We can decide and control, which of these errors should be displayed at the time of its occurrence, by using predefined constants available in PHP represented as the error code or error constants. Let us look into the following table to see the available error constants for the PHP errors classified based on...

PHP Errors

There are various possible error occurrences may happen in PHP. These errors are categorized based on the time of occurrences and based on whether it is recoverable or not. And then, this classification is made with respect to how it is triggered to send an error message to the browser. It might be triggered automatically while executing an improper line of code or triggered by the user by using trigger_error() function. PHP errors will occur with some improper attempts with PHP scripts like, an invalid line of code execution, an infinite...