Make and run queries in database is the type of daily task for all programmers, how the market offers various database options is important to know how to make them.

In PostgreSQL, query records in database tables is recorded through the SELECT command, as shown in the following syntax:

SELECT [Columns] FROM [Table]

As an example, we will see a table that stores the products are in stock in a store.

SELECT Cod_prod, Name, Price, Quantity FROM product_store

In the above query, this query will return the product code, name, value and quantity. If there are more columns in the table and is required viewing all just use the character (*) instead of name of the columns, as shown in the example below:

SELECT * FROM product_store

You can also use other commands with the SELECT, WHERE, for example, return only the records that comply with the conditionally indicated.

SELECT Cod_prod, Name, Price, Quantity FROM product_store

WHERE Cod_prod = 1

In the above command only product that has the code 1 will be shown in the query.


PHP PostgreSQL

Currently he is known as one of the most advanced free databases in the world, created in 1985 by Michael Stonebraker, it is in the version 9.0 released in 2010. The PostgreSQL Global Development Group works hard in the source code of the database to make it more complete.PostgreSQL has gained more space in the market for web development because of the large amount of resources it has, moreover, it is a free DBMS and this makes it extremely attractive for those who need to work with low-cost projects.

PHP PostgreSQL

Who uses the PostgreSQL database in PHP projects successfully combine low production and maintenance cost, also it has many of the features that the databases offers thus making it a complete option.

But when you are developing a project, is essential to have a tool that can assist you. With Scriptcase you can easily connect to PostgreSQL database, all you need to inform to connect to the PostgreSQL is:

  • Connection Name: It will help you identify the connection among the others.
  • DBMS Driver: it Will show a list with all drivers available.
  • Server/Host(Name or IP): The physical address from the database, it may be local on your machine, on your local network or remote in the cloud.
  • Port: The port that you want to use to connect to your database.
  • Username: Username for the user from the database.
  • Password: The password from the previous selected username.

PHP PostgreSQL Connection

Once you connect Scriptcase with your database, it will read your tables and create applications based on the desired tables. Scriptcase will identify all special characteristics from your table, such as primary keys, foreign key, auto-increments, among others, and will show that at the application level. All the CRUD (Create, Read, Update and Delete) actions will be managed by the Scriptcase. On forms and reports all the navigation, searches and filters (Static or Dynamic) will be also handled by Scriptcase automatically.

Scriptcase support stored procedures and all SQL statements (joins, order by, group by, among others) of PostgreSQL, why lose time when you have Scriptcase to help you out?! Download it now and test it free for 20 days!


Know more about the best and most efficient PHP RAD Tool of the market! Get to know Scriptcase.

By ,

September 23, 2013


You might also like…

5 reasons you can’t miss a Black Friday Scriptcase!

This November we bring you the biggest and most important discounts of the year! And do you know wh...

Taking a look at Scriptcase version 9.7

After the big Scriptcase 9.7 presentation event, we have a new version of Scriptcase for download, ...

October Newsletter

Follow the latest news for the month of October! Webinars, blog posts, videos, and more. WEB...

You might also like…

Get new posts, resources, offers and more each week.

We will use the information you provide to update you about our Newsletter and Special Offers. You can unsubscribe any time you want by clinck in a link in the footer of any email you receive from us, or by contacting us at Learn more about our Privacy Police.