Показать сообщение отдельно

  #5  
Старый 06.11.2007, 17:05
+toxa+
[Лишённый самовыражени
Регистрация: 16.01.2005
Сообщений: 1,787
Провел на форуме:
9751379

Репутация: 3812


Отправить сообщение для +toxa+ с помощью ICQ Отправить сообщение для +toxa+ с помощью AIM
По умолчанию

Цитата:
Сообщение от Zitt  
эт не то?
http://scripts.mydiv.net/download-Postgres-Result-View.html
PHP код:
<?php

Function ShowResults($result) {

  if (
$result) {
    
$rows pg_NumRows($result);
    
$cols pg_NumFields($result);

    echo(
"<table border=1>\n");
    
/* Create the headers */
    
echo("<tr>\n");
    for(
$i 0$i $cols$i++) {
      
printf("<th>%s</th>\n"pg_FieldName($result$i));
    }
    echo(
"</tr>");
    for(
$j 0$j $rows$j++) {
      echo(
"<tr>\n");
      for(
$i 0$i $cols$i++) {
        
printf("<td>%s</td>\n"pg_result($result$j$i));
      }
      echo(
"</tr>");
    }
    echo(
"</table>");
  } else {
    echo(
pg_errormessage);
  }
}
?>
вот и всё что там было)
__________________