Обсуждение: Table or not table ?

Поиск
Список
Период
Сортировка

Table or not table ?

От
Edouard DESSIOUX
Дата:
Hello

I wanted to be sure that a table exist before
making a request such as "select * from $table"
because it display something like 

Warning: PostgresSQL query failed: 
ERROR: prout: Table does not exist. in
/www/dooz.corp.intrinsec.com/tableau.php3 on line 15

Does anyone know what i could do to verify that
the table exist, or help to disable error messages
on web pages ?

Bye

-- 
Edouard DESSIOUX
Proverbe chien :
"Si ca se mange pas,Si ca se baise pas,Pisse dessus !!"


Re: [INTERFACES] Table or not table ?

От
Ivo Simicevic
Дата:
On Mon, Dec 13, 1999 at 05:23:59PM +0100, Edouard DESSIOUX wrote:
> Hello
> 
> I wanted to be sure that a table exist before
> making a request such as "select * from $table"
> because it display something like 
> 
> Warning: PostgresSQL query failed: 
> ERROR: prout: Table does not exist. in
> /www/dooz.corp.intrinsec.com/tableau.php3 on line 15
> 
> Does anyone know what i could do to verify that
> the table exist, or help to disable error messages
> on web pages ?
> 
> Bye
> 
> -- 

Try

select * from pg_tables where tablename="wanted_table";

Ivo.


Re: [INTERFACES] Table or not table ?

От
Lamar Owen
Дата:
Edouard DESSIOUX wrote:
> 
> Hello
> 
> I wanted to be sure that a table exist before
> making a request such as "select * from $table"
> because it display something like

SELECT tablename FROM pg_tables WHERE tablename='$table';

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11