MySQL Basics In Pictures
  1. Save in the programs directory.

    Then close the text editor.

    The main difference between this program and the program lies in $query.

    In this program, instead of selecting data only from the names table, the query selects data from two tables: name and quote:

    FROM quote,name

    It returns a president's name and his quote:

    print "\"$quote\"\n";
    print " - $first ";
    print "$middle " if ($middle);
    print "$last\n";

    As its name suggests, selects a president's quote at random:

    FROM quote,name
  2. Open a terminal window and type:

    cd programs

    then press ENTER.