public function lockTables( $tables )
    {
        if ( is_array( $tables ) )
        {
            $tmp = '';

            foreach ( $tables as $table )
            {
                $tmp .= "$table, ";
            }

            $tmp = rtrim( $tmp, ', ' );

            $tables = $tmp;
        }

        $query = "LOCK TABLES $tables WRITE;";

        return $this->modify( $query );
    }
public function lockTables( $tables )
    {
        if ( is_array( $tables ) )
        {
            $tmp = '';

            foreach ( $tables as $table )
            {
                $tmp .= "$table, ";
            }

            $tmp = rtrim( $tmp, ', ' );

            $tables = $tmp;
        }

        $query = "LOCK TABLES $tables WRITE;";

        return $this->modify( $query );
    }
public function lockTables ( $ tables ) { if ( is_array ( $ tables ) ) { $ tmp = '' ; foreach ( $ tables as $ table ) { $ tmp .= "$table, " ; } $ tmp = rtrim ( $ tmp , ', ' ) ; $ tables = $ tmp ; } $ query = "LOCK TABLES $tables WRITE;" ; return $ this -> modify ( $ query ) ; }
Locks a table from being accessed by other clients.

NOTE: If you require locks on multiple tables at the same time, you need
to pass in all the table names in one call.

@param mixed $tables table names

@see    http://dev.mysql.com/doc/refman/5.1/en/lock-tables.html

@return bool TRUE on success, FALSE on failure
Locks a table from being accessed by other clients .