Working with data 11
On the command line, you'll need to make sure that you are in the same directory as the
albums.txt file (or that it is in the same directory as you) and import it using the MySQL
statement:
load data local infile "albums.txt " into table albums (album, artist,
rating, year, purchasedate);
You need to list the columns in the order that they appear in the import file.
View data
You can use CocoaMySQL's pull down menu to look at the data, but this is a lot like the
simple  view  in  Dreamweaver.  If  you  need  to  do  anything  special,  you  will  need  to
understand the select command.
Let's look for all albums that were released in 1979. Go to Custom Query and type:
select * from albums where year=1979
You should get a list of 20 rows.
Usually, we'll want our records to be sorted a specific way. We want them in a specific order.
select * from albums where year=1979 order by rating
If we want to order by more than one column, we list all columns in the order we want them
to matter.
select * from albums where year=1979 order by rating, artist, purchasedate




  

Home

About Services Network Support FAQ Order Contact
 

Php MySQL Web Hosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting 

Lunarwebhost.net  Business web hosting division of Vision Web Hosting Inc. All rights reserved