Sql Group By Snippets


Make a MySQL Database called "db" with a table named "variables" with three rows ("id", "title", and "content"). Insert your data. Then call the page by going variables.php?id=1 etc.

14 May, 2011   

This is a general code to use when deleting an item from a MySQL database. This code isn't considered definitive and can be written in many varied ways. A variation of the code would be not to delete the record (as you tend to always need to restore or retrieve it sooner or later) you can add a 'status' field. If status='d' then it is...

05 May, 2012   

ASP code example to return a long representing the record count returned by an SQL statement

09 May, 2011   

This is a general code to use when inserting an item from a MySQL database. This code isn't considered definitive and can be written in many varied ways. An extention of this code would be to make sure the entry you are adding to the database doesn't already exist (to save dupicate entries). Note: This code requires you to connect to the MySQL...

09 February, 2012   

Syntax for both the column and table aliases

17 September, 2014   

PHP example code for using MySQL and a contact form to allow a group of users on a site to contact each other safely.

19 March, 2011   

Showing here an example of PL SQL Query

14 May, 2012   

PL SQL Descending order in Oracle

09 September, 2014   

Simple Javascript snippet that lets you toggle a group of checkboxes on or off at the same time. This is the format for your HTML form.

02 January, 2012   

The UPDATE statement is used to update existing records in a table

20 February, 2012   

SQL select query to show records with specify date in where clause

02 January, 2012   

The ORDER BY keyword is used to sort the result set by a specified column.

PHP & Mysql based code to Print table with client-side sorting function.

07 April, 2013   

A simple example code for user login with a login form and database query

SQL uses the MAX function to find the maximum value in a column.

31 October, 2011   

It is a class file which can export to excel. simply call the function and give sql Query and sql connection.

26 November, 2015   

Show the currently active processes.

26 February, 2011   

Here shown how to highlight syntax

09 February, 2012   

Syntax for the Length function

11 July, 2013   

It can be inserted into the newer table without any hassles over an incompatible number of fields.