Set proxy in PHP pear

Leave a comment

Sometimes system default proxy settings not working for php pear.

pear config-set http_proxy http://proxy.iub.edu.bd:3128

Advertisements

Usefull PostgreSql commands

Leave a comment

 To show list of databases
mysql: SHOW DATABASES
postgresql: \l
postgresql: SELECT datname FROM pg_database;

To connect/use a particular database

mysql: use database_name;

Postgresql: \c database_name

 

To show list of tables in your database
mysql: SHOW TABLES
postgresql: \d
postgresql: SELECT table_name FROM information_schema.tables WHERE table_schema = ‘public’;

 

To show list of columns in a particular table / schema use :
mysql: SHOW COLUMNS
postgresql: \d table_name
postgresql: SELECT column_name FROM information_schema.columns WHERE table_name =’table‘;

 

%d bloggers like this: