SQL Basics

SQL Basics

Learn the basics of SQL queries quickly Select Data The SELECT statement retrieves data from a table. The asterisk (*) selects all columns. SELECT * FROM employees; This command retrieves the name and salary of employees. SELECT name, salary FROM employees; Filtering Data To filter results, you can use the WHERE clause: SELECT name, salary FROM employees WHERE salary > 60000; Sorting and Grouping of Data ORDER BY: Used to sort the result set. SELECT * FROM employees ORDER BY salary DESC; GROUP BY: Groups rows sharing a property. SELECT position, COUNT(*) FROM employees GROUP BY position; The SELECT statement retrieves data from a table. The asterisk (*) selects all columns. SELECT * FROM employees; This command retrieves the name and salary of employees. SELECT name, salary FROM employees; To filter results, you can use the WHERE clause: SELECT name, salary FROM employees WHERE salary > 60000; ORDER BY: Used to sort the result set. SELECT * FROM employees ORDER BY salary DESC; GROUP BY: Groups rows sharing a property. SELECT position, COUNT(*) FROM employees GROUP BY position;

composer-and-symfony

Composer in Windows and Symfony

As defined in Composer site – “Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.” Composer requires PHP 5.3.2+ to run.

Drupal 7 Redirect after First and Later Login

Drupal 7 Redirect after First and Later Login

In many cases you may need to take in extra information from user and display some type of graph after registration which cannot be fulfilled by adding extra fields within the form. In other way we can redirect to a second page containing your required form.

Drupal 7 Node Type Based Custom Template

In many cases of theming in Drupal we may may need a different set of header and footer. We can achieve this by writing a couple of lines in template.php for your current Drupal theme. Code snippet for Drupal 7 node type based custom template.