067 - MySQL KILL Command

Use KILL statement to terminate a client connection to MySQL. You can use the SHOW PROCESSLIST statement
to obtain a connection thread identifier for use in this statement.
As of MySQL 5.x, you can use CONNECTION or QUERY keywords to distinguish between terminating a connection or
terminating just the current query associated with the given connection.

066 - File Compression and Packaging

Linux can compress file into a variety of formats and uncompress them. The most popular format is GNU Zip (gzip),
whose compressd files are named with .gz suffix.
Other commonly found formats are classic Unix compression (.Z suffix), bzip2 compression (.bz2 suffix) and Zip files
from Windows systems (.zip suffix).

065 - Linux Boot Method

Once your Linux system is installed, rebooting the system is generally straightforward. But with the wide variety
of hardware and software in use, there are many possibilities for configuring your boot process.
The most common choices are:

064 - Connecting to Multiple Database within Drupal

In the settings.php file, $db_url can be either a string (as it usually is) or an array composed of multiple
database connection strings.

Here's the default syntax, specifying a single connection string :

$db_url = 'mysql://username:password@localhost/databasename';

When using an array, the key is a shortcut name you will refer to while activating the database connection, and
the value is the connection string itself.

Here's an example where we specify two connection strings, default and legacy:

063 - Connecting to the Database in Drupal

Drupal automatically establishs a connection to the database as part of its normal bootstrap process,
so you do not need to worry about doing that.
If you are working outside Drupal itself (for example, you're writing a stand-alone PHP script or have existing
PHP code outside of Drupal that needs access to Drupal's database)
You would use the following approach.

// Make  Drupal PHP's current directory

chdir('full/path/to/your/drupal/installation');

// Bootstrap Drupal up through the database phase

062 - Change from image1 to image2 by mouse

This is sample codes, when a user clicks on the image, it changes from pic_1.gif to pic_2.gif.

Example:

061 - extract() function

The extract() function converts elements in an array into variables in their own right, an act commonly called "exporting"
in other languages. Extract takes a minimum of one parameter, an array, and returns the number of elements extracted.
The following example is useful for retriving information from database.

Example:

060 - mysqldump

This utility exports MySQL data and table structures. Typically, you use it to make backups of database or
to copy database from one server to another. You can run it on an active server.
For consistency of data between tables, the table should be locked (--lock-table option) or mysqld
daemon should be shutdown.
There are three syntaxes for this utility. The first method shown makes a backup of all databases for
the server. The second method backs up specific database, named in a space-separated list, including

059 - Show Status

SHOW statement display status information and variables from the server. You can reduce the number
of variables shown with the LIKE clause, based on a naming pattern for the variable name.
Similarly, the WHERE clause may be used to refine the results set. The following is an example
of how you can use this statement with the LIKE clause.

mysql> SHOW STATUS
-> WHERE Variable_name LIKE '%log%'
-> AND Variable_name NOT LIKE '%Innodb%';

058 - Create MySQL Database for Drupal

To install drupal application, you have to create MySQL Database.

Syndicate content