MySQL

SQL: some basic JOIN syntax

November 16, 2011
By

INNER JOIN and , (comma) are equivalent in the absence of a join condition and “JOIN” is defined to be equivalent to an “INNER JOIN” Examples: SELECT * FROM customer AS c, orders AS o WHERE c.custkey = o.custkey or (same): SELECT * FROM customer AS c JOIN orders AS o WHERE c.custkey = o.custkey or (same): SELECT * FROM customer AS c INNER...

Read more »

SQL: date – time displays, conversions

November 1, 2011
By

Unix Time UNIX TIME: the number of seconds since the first second of the first day of 1970. The CURRENT_TIMESTAMP(), CURRENT_TIME(), CURRENT_DATE(), and FROM_UNIXTIME() functions return values in the connection’s current time zone, which is available as the value of the time_zone system variable. In addition, UNIX_TIMESTAMP() assumes that its argument is a datetime value in the current time zone. example: $start = ’1234567890′...

Read more »

Enhancing, expanding limits, customizing, phpMyAdmin

October 29, 2011
By
Enhancing, expanding limits, customizing, phpMyAdmin

The database tool, phpMyAdmin is and has been, the most popular and most awarded among MySQL administrators and developers. It was mentioned by the author of the first php and MySQL book I read. The administrators and developers I have met since, all use it. It is also one which can be installed on the website. Over time, I have learned ways to customize...

Read more »

change root password in MySQL

September 30, 2010
By

how to change / fix the root password in MySQL First: If you install MySQL through an X-window GUI application, like System >> Administration >> Add-Remove Software, then, it will install without prompting, and the one mysql user that is created, “root” will have a blank password. From a terminal command line, type $ mysql -u root -p Enter password: [just hit enter...

Read more »

NorthWind db in MySQL

February 16, 2010
By

Microsoft’s SQL Server 2000 comes with 2 sample databases, one of which is NORTHWIND a sample accounting database Below are the table definitions needed to export NorthWind from MS SQL Server 2000 and import NorthWind into MySQL I have exported out the main table definitions and their data and put them in the MySQL format and imported them into MySQL. (see the definitions below)...

Read more »

A few NorthWind MySQL PHP scripts

February 15, 2010
By

Note that the dates on the NorthWind data range only across 1 full year, 1997: from July 1996 to May 1998. Each line of data below comes from 3 files (tables): the orders file, the order-details file, and the customer file. There are also files of employees, products, suppliers, shippers, and more. <p align="center"> Orders Shipped the 7 days before today in 1997 </p>...

Read more »