Postgres terminal meta-command "\H" within PHP scripts

From: Date: Wed, 01 Nov 2000 01:57:02 +0000
Subject: Postgres terminal meta-command "\H" within PHP scripts
Groups: php.db 
Request: Send a blank email to php-db+get-4081@lists.php.net to get a copy of this message
Hello, There is a meta-command in psql, '\H', that toggles HTML output as a result of an sql statement. I tried to execute that in PHP scripts like: 'pg_exec($conn, "\\H") or die ("HTML format failed");' But, it didn't work. The reason I want to do this is that I can just save the output to a file and it will have a nice html table layout, so that I don't have to format a query result in PHP. It will be a lot convenient. There is no free lunch, but well, do you know a way to go around and execute a psql meta-command in PHP? =) Thank you. - Bernie _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com.

« previous php.db (#4081) next »