ini file:
php_extension=php_sqlite.dll
CHAPTER 22 ?– SQLITE 569
Using the SQLite Command-Line Interface
The SQLite command-line interface offers a simple means for interacting with the
SQLite database server. With this tool, you can create and maintain databases, execute
administrative processes such as backups and scripts, and tweak the client??™s behavior.
Begin by opening a terminal window and executing SQLite with the help option:
%>sqlite -help
If you??™ve downloaded SQLite version 3 for Windows, you need to execute it like so:
%>sqlite3 -help
In either case, before exiting back to the command line, you??™ll be greeted with the
command??™s usage syntax and a menu consisting of numerous options. Note that the
usage syntax specifies that a file name is required to enter the SQLite interface. This
file name is actually the name of the database. When supplied, a connection to this
database will be opened if the executing user possesses adequate permissions. If the
supplied database does not exist, it will be created, again if the executing user possesses
the necessary privileges.
As an example, create a database named corporate.db. This database consists of a
single table, employees. In this section, you??™ll learn how to use SQLite??™s commandline
program to create the database, table, and sample data. Although this section
isn??™t intended as a replacement for the documentation, it should be sufficient to enable
you to familiarize yourself with the very basic aspects of SQLite and its command-line
interface.
Pages:
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653