П О Р Т А Л                            
С Е Т Е В Ы Х                          
П Р О Е К Т О В                        
  
Поиск по сайту:
                                                 
Главная

О проекте

Web-мастеру
     HTML & JavaScript
     SSI
     Perl
     PHP
     XML & XSLT
     Unix Shell

MySQL

Безопасность

Хостинг

Другое








Самое читаемое:

Учебник PHP - "Для Чайника".
Просмотров 3523 раз(а).

Иллюстрированный самоучитель по созданию сайтов.
Просмотров 6121 раз(а).

Учебник HTML.
Просмотров 3276 раз(а).

Руководство по PHP5.
Просмотров 5498 раз(а).

Хостинг через призму DNS.
Просмотров 4148 раз(а).

Подборка текстов стандартных документов.
Просмотров 55773 раз(а).

Учебник PHP - Самоучитель
Просмотров 3093 раз(а).

Документация на MySQL (учебник & справочное руководство)
Просмотров 5746 раз(а).

Внешние атаки...
Просмотров 3843 раз(а).

Учебник PHP.
Просмотров 2826 раз(а).

SSI в примерах.
Просмотров 37463 раз(а).



 
 
| Добавить в избранное | Сделать стартовой | Помощь





Руководство по PHP
Пред. След.

pg_trace

(PHP 4 >= 4.0.1, PHP 5)

pg_trace -- Enable tracing a PostgreSQL connection

Описание

bool pg_trace ( string pathname [, string mode [, resource connection]] )

pg_trace() enables tracing of the PostgreSQL frontend/backend communication to a file. To fully understand the results, one needs to be familiar with the internals of PostgreSQL communication protocol.

For those who are not, it can still be useful for tracing errors in queries sent to the server, you could do for example grep '^To backend' trace.log and see what queries actually were sent to the PostgreSQL server. For more information, refer to the PostgreSQL Documentation.

Список параметров

pathname

The full path and file name of the file in which to write the trace log. Same as in fopen().

pathname

An optional file access mode, same as for fopen(). Defaults to "w".

connection

PostgreSQL database connection resource. When connection is not present, the default connection is used. The default connection is the last connection made by pg_connect() or pg_pconnect().

Возвращаемые значения

Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.

Примеры

Пример 1. pg_trace() example

<?php
$pgsql_conn
= pg_connect("dbname=mark host=localhost");

if (
$pgsql_conn) {
   
pg_trace('/tmp/trace.log', 'w', $pgsql_conn);
   
pg_query("SELECT 1");
   
pg_untrace($pgsql_conn);
   
// Now /tmp/trace.log will contain backend communication
} else {
   print
pg_last_error($pgsql_conn);
   exit;
}
?>

Смотрите также

fopen()
pg_untrace()


Пред. Начало След.
pg_set_error_verbosity Уровень выше pg_transaction_status


Если Вы не нашли что искали, то рекомендую воспользоваться поиском по сайту:
 





Copyright © 2005-2016 Project.Net.Ru