Oct 15

The include to go on the header, replace the abcdef key with your google API key.

<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=abcdefg&sensor=true">

The

window.addEvent('domready',function()
{	new GClientGeocoder().getLatLng('',function(pt)
{	if (pt)
{	var map = new GMap2(document.getElementById('map'));
map.setCenter(pt, 13);
map.addOverlay(new GStreetviewOverlay());
map.addOverlay(new GMarker(pt));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());

myPano = new GStreetviewPanorama(document.getElementById('street-view'), { latlng:pt });
GEvent.addListener(map,'click', function(overlay,latlng)
{	myPano.setLocationAndPOV(latlng);
});
}
});

});
window.onunload = GUnload;

Oct 15

Get a list of column names for a table.

SHOW COLUMNS FROM TableName

Load a comma separated (csv) data into a MySQL table.

LOAD DATA LOCAL INFILE '/tmp/members.csv' INTO TABLE members FIELDS TERMINATED BY ',' LINES TERMINATED BY 'n' (lastname, firstname, dob);

Rename a MySQL table.

ALTER TABLE access_log RENAME TO access_log_old;

Create a new user and give them access to a MySQL database.

GRANT ALL ON cms.* TO cms_user@'localhost' IDENTIFIED BY '******';

Join fields in a MySQL query.

SELECT CONCAT('Name: ' , members.first_name ,' ', members.last_name) AS name FROM members

MySQL search and replace.

UPDATE pages SET footer_text = REPLACE(footer,'Copyright 2007','Copyright 2008');