image

Drupal Hosting

2020Media is a leading UK Drupal hosting provider. We offer a tuned hosting environment for Drupal that is fast and responsive. Every account includes "Zero-Click" install and/or free migration services. Drupal security updates are done free of charge. Our knowledgeable technical team are happy to troubleshoot your site and advise on modules or functionality.

Read More

image

WordPress Hosting

UK WordPress hosting from 2020Media. Comes with free migration or "Zero-Click" install, backup and support to get you started whether you're just starting out or migrating a fully functional site. We've built or hosted hundreds of WordPress websites so you will be in safe hands. Includes our Managed WordPress service FREE for the first year.

Read More

Joomla

Joomla Hosting

2020Media is a great choice for a Joomla website - we've been using it for years. We will install and set up Joomla for you and our inhouse experts will help you with any problems you may encounter along the way. Our migration service moves your existing Joomla site safely and with no downtime.

Read More

image

Tomcat Hosting

2020Media is an acknowledged leader in UK Java Tomcat hosting. The pioneer in providing affordable shared Java hosting back in 1999, 2020Media now offers a range of Tomcat hosting options from shared to dedicated.

Read More

UK Sales: 0800 035 6364 | sales@2020media.com | We'll Call You

Introduction to MySQL

This guide is intended to jog the memory about syntax of the basic commands, and not to act as a comprehensive reference.

The full documentation and information about MySQL can be found at http://dev.mysql.com/doc/, Alternatively, MySQL by Paul DuBois is a good reference (ISBN 0-7357-0921-1)

Connecting

Log into the server using SSH and then enter the command

mysql -u 'username' -p -h 'hostname'

where username and hostname are as provided on your account details letter. This will start a basic client that allows you to enter commands to manulipulate the database. To execute each command, type in the command and a terminating ';', for example'select * from test;'

Creating Tables

Basic Form

CREATE TABLE
(
Item 1,
Item 2,
Item 3
)

 

Example Items would be

an unsignednumber INT UNSIGNED NOT NULL,
a date DATE NOT NULL,
a string VARCHAR(200) NOT NULL,
an enumeration ENUM('T','F') NOT NULL,
an index INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY

Adding Values

Basic Form

INSERT INTO tablename VALUES (
columsitems
);

Example

INSERT INTO tablename VALUES ( 
'string', 345, 'T'
);

Selection

Basic Form:

SELECT * FROM tablename 
SELECT col1, col2,col3 FROM tablename
SELECT * FROM tablename WHERE expression
SELECT * FROM tablename ORDER BY col1 DESC;
SELECT * FROM tablename WHERE col2 LIKE 'W%'

Updating

UPDATE tablename SET col1='string'
UPDATE tablename SET col1 ='string' WHERE expression

Deleting Items (Rows)

Basic Form:

DELETE FROM tablename WHERE col1=expression

Adding Columns

ALTER TABLE tablename ADD col INT NOT NULL,

 

2020Media introduces Moodle Hosting - UK servers and UK Moodle experts setup your site ready to use. Read more...
Special Offer for Longer Registration Periods Register or renew a .com, .net or .org domain name for 5 years we'll include 1 year free*. Read more...
2020Media is now offering zero-click installation of the popular TYPO3 content management system. Read more...

Our blog is regularly updated with news, tips and industry opinion.

Clients

  • AggieWestons
  • baker-and-mckenzie
  • arts-council-england
  • Big Finish
  • barratt-developments-logo
  • City-of-Lincoln-council-logo
  • brora-logo
  • DenisMacShane
  • Construction-Industry-Council
  • colchester