SELECTing specified fields in MySQL

With a small table there is little reason not to use SELECT * to get data from all fields. In a large table where not all of the fields are needed it is more efficient to name the fields you want:

            
$cdquery="SELECT cdTitle, cdPrice FROM firsttable";            
        

The data from cdReference was not used in firstmysqlpage.php so amend that page to just SELECT the fields you need.

submit to reddit Delicious Tweet