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');
August 21st, 2010 at 8:44 pm
Hi, The above articles is very impressive, and I really enjoyed reading your blog and points that you expressed. I love to come back on a regular basis, pl. post more on the subject. Thanks.
January 26th, 2011 at 1:52 am
Can I simply say what a aid to find someone who actually is aware of what theyre speaking about on the internet. You undoubtedly know the right way to bring a problem to mild and make it important. More folks need to learn this and understand this facet of the story. I cant believe youre not more fashionable because you definitely have the gift.
September 10th, 2011 at 12:12 pm
Good post. I am a normal visitor of your site and appreciate you taking the time to maintain the excellent site. I will be a regular visitor for a really long time.