Creating PostgreSQL stored function and calling the same using PHP script. |
The query tool, pgAdmin3.exe of PostgreSQL is a fantastic query
tool. Unlike PL-SQL, the function created with SQL-Query tool, will help
to create a SQL query.
The SQL Developer tool for oracle creates PL/SQL Block with codes to call the custom functions.
|
How to Query stored function with PHP : //PostgreSQL SQL query script: $sql="SELECT round (cfcal($celcius),2)"; //Oracle stored function for the similar code $stid = oci_parse($conn, "begin :bv:=CTOF(29.25); end;");
|
Workstation: manas9 : windows 8
pwd: postgre_manas9 Now open a query pane Opens a sql query window Now add any value you want |
Use this script with PHP
|
![]() |