Tagged Questions
0
votes
1answer
18 views
Storing a shapefile into postgresql using PHP
I'm trying to develop a PHP script that lets users upload shapefiles to import to a postGIS database.
First of all, for the conversion part, AFAIK we can use shp2pgsql to convert the shapefile to a ...
-1
votes
0answers
20 views
PHP console PDO Postgres encoding issue
I have been struggling with an encoding issue for a while now, my goal is reading data from a postgres database and put it into a MySQL database. I wrote a php script for cron to do the job. Only that ...
0
votes
0answers
21 views
connect PostgreSQL DB and php
I inastall php 5.4, apache and postgresql 9.2 on Windows 7 OS.
Now, I am trying connect to postgresql DB from php file, this is php connect code:
$dbconn = pg_connect("host=localhost dbname=postgres ...
0
votes
1answer
64 views
PHP script very slow when adding postgres query in a while loop
I have a PHP script that loops through 2000+- records uisng a while loop. Within this while loop a postgres sql query has to be performed, unfortunately it can't be excluded from the while loop.
$sql ...
-4
votes
0answers
28 views
reading lat and long from postgresql and showing them on google maps api then tagging on the maps and tagging on it and gettin lat and long
<?php
$dbconn = pg_connect("host=localhost dbname=pp user=postgres
password=0000");
?>
<html>
<head>
<meta http-equiv="content-type" ...
1
vote
1answer
38 views
PHP Postgres PDO driver does not support prepared statement?
Am I losing my mind, or does the Postgres PDO driver just not support prepared statements, but instead emulates them client side?
The following code returns NO ERROR for the prepare() call, even ...
0
votes
2answers
41 views
Is it possible to return nested records from pl/pgsql?
I have the following tables in pgsql 8.4:
user
permission
role
user_permission (n:m)
role_permission (n:m)
user_role (n:1)
I have a REST service, by GET /user/1 I have to get something like this ...
0
votes
0answers
21 views
Versioning Entity relations
I'm in the process of designing a system that stores entities and their relations over time.
Each entity has properties, each property should be versioned, so when a property of the entity changes a ...
0
votes
0answers
30 views
Retrieving a TEXT column from postgresql with php
we have an app with jsf and jboss that sets some text on a database with postgresql. When we are using our system with JSF works perfectly, we are able to retrieve, save and everything through our ...
0
votes
2answers
43 views
php - plpgsql calling stored procedure and fetching result set
I am trying to make a stored procedure which returns rows from the user table.
I call it from php with pg_ functions: pg_prepare($conn, $id, 'SELECT user_read_all()') and pg_execute($conn, $id, ...
0
votes
2answers
30 views
Outputting a query of rows to a table in php
I'm using the below code to output rows from my table called data_cases:
$query = 'SELECT * FROM mydb.data_cases
WHERE id=123 ORDER BY log_date_time DESC';
$result = pg_query($query) or ...
0
votes
2answers
46 views
How To Optimize PostgreSQL generate_series function
I have a query that uses PostgreSQL generate_series function but when it comes to large amounts of data, the query can be slow. An example of code the generates the query is below:
$yesterday = ...
0
votes
0answers
17 views
Installing PostgreSQL for Hip-hop/HHVM
Has anyone managed to install Postgresql for Hip-hop/HHVM?
I've have postgresql idl:
https://github.com/eantoranz/hiphop/blob/master/src/idl/postgresql.idl.php
I also have a CMake file:
...
0
votes
1answer
29 views
How to detect postgresql stored procedure language support?
How can I detect on a production server which languages are available for stored procedures?
I can run sql queries from php and I have phppgadmin on the production server.
0
votes
5answers
31 views
Date string wont convert to timestamp
I am trying to grab any record with a ctime of today. For some reaosn, &tomorrow and &yesterday do not have any values. If I remove strtotime() their values are string representations of the ...