Re: How can I get metadate of a table in PHP3?

Поиск
Список
Период
Сортировка
От knut.suebert@web.de
Тема Re: How can I get metadate of a table in PHP3?
Дата
Msg-id 20020902194412.GA657@fraxinus.reticulum
обсуждение исходный текст
Ответ на How can I get metadate of a table in PHP3?  (Zhidian Du <zdu@cs.nmsu.edu>)
Список pgsql-php
Zhidian Du schrieb:

> How can I get metadate of a table in PHP3?

If you think about things like the output of "\d tablename", turn on
the logging of queries, do a "\d tablename" and watch the
logfiles.

Somewhere I need the fieldtypes of a table named $this->table, the
query is

      $q = "SELECT a.attname, format_type(a.atttypid, a.atttypmod)
        FROM pg_class c, pg_attribute a
        WHERE c.relname = '".$this->table."'
        AND a.attnum > 0 AND a.attrelid = c.oid
        ORDER BY a.attnum";

which is stolen from the logs - I'll never understand it ;)

Greetings,
Knut Sübert

В списке pgsql-php по дате отправления:

Предыдущее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: How to start PgSQL on FreeBSd to the port 5432
Следующее
От: Zhidian Du
Дата:
Сообщение: Re: How can I get metadate of a table in PHP3?