Re: [SQL] PHP pg_escape_string

2009-06-15 Thread Andy Shellam
Hi, Zdravko Balorda wrote: there are both pg_(un)escape_bytea() functions but only one pg_escape_string()... I wonder if I may be missing something here? Yeah, I think you are. pg_escape_string (funnily enough) escapes string data which is then stored in the database. You would use this for

[SQL] PHP pg_escape_string

2009-06-15 Thread Zdravko Balorda
Hi, I have a PHP/PGSQL question: there are both pg_(un)escape_bytea() functions but only one pg_escape_string()... I wonder if I may be missing something here? Thank you for any explanation, Zdravko. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscri

Re: [SQL] [PHP]

2009-03-07 Thread Andreas Wenk
Jhonny Velasquez c. schrieb: hola a todos Hi, this is the english mailinglist ... ther's also an spanish mailinglist I guess ;-) estoy programando en php tengo el siguiente esquema de BD BDACADEMICA personas(idpersona, nombres, paterno) BDSIAP PersonasDatosActualizables(idpersona,

Re: [SQL] Postgres-sql-php

2008-10-23 Thread Oliveiros Cristina
I guess you can change a little the query to your needs. The problem is pretty much the same... I've used c3 column in equality, but if this column has repeated values, just choose any column or combination of columns which is unique. Best, Oliveiros SELECT a.c1,a.c2,b.c3,b.c4,a.c5,b.c6 FROM ( SE

Re: [SQL] Postgres-sql-php

2008-10-23 Thread Oliveiros Cristina
Just add two conditions on the previous query A particularity of this approach is that the non-null record will always appear with the first child in alphabetical order. But, according to what you explain, I guess it is OK, and if it doesn't it is easily changed. :-) Also I've changed the first c

Re: [SQL] Postgres-sql-php

2008-10-23 Thread Zied Kharrat
hi, i don't want any sort.. just like this example *num father child age col5 *1 joe bruce14 8 lei 10 mike 5 2manuel child135 16 child233 child3 30 this is what

Re: [SQL] Postgres-sql-php

2008-10-23 Thread Oliveiros Cristina
s SELECT a.num,a.father,b.child,b.age FROM ( SELECT num,father, MAX(age)as maximo FROM t1 GROUP BY num,father) a RIGHT JOIN t1 b ON b.age = a.maximo - Original Message - From: Zied Kharrat To: pgsql-sql@postgresql.org Sent: Thursday, October 23, 2008 9:14 AM Subject: [SQL] Po

[SQL] Postgres-sql-php

2008-10-23 Thread Zied Kharrat
Hi Everybody.. Let's present my problem: I have a table named *t1* and i will insert differents values like this : insert into t1 (num,father,child,age) values ('1','joe','bruce','14',); insert into t1 (num,father,child,age) values ('1','joe','lei','10',); insert into t1 (num,father,child,age) v

Re: [SQL] php to pgsql question

2008-03-04 Thread Leif B. Kristensen
On Tuesday 4. March 2008, li ethan wrote: >HI guys! >I've been encounting a problem when I configured PHP to support >Postgres.I think may be someone in here can solve my problem. >Postgres version is 8.1.4,and the install path is > /usr/local/pgsql, PHP is 4.4.2. >I use this parameter

[SQL] php to pgsql question

2008-03-04 Thread li ethan
HI guys! I've been encounting a problem when I configured PHP to support Postgres.I think may be someone in here can solve my problem. Postgres version is 8.1.4,and the install path is /usr/local/pgsql, PHP is 4.4.2. I use this parameter to configure PHP--with-pgsql=/usr/local/pgsql

Re: [SQL] [PHP] PL/pgSQL and PHP 5

2006-08-09 Thread John DeSoi
Glad you found the problem. On Aug 9, 2006, at 11:42 PM, PostgreSQL Admin wrote: $connection->execute("SELECT insert_staff_b('$staff [insert_firstname]'::varchar)"); $connection->execute("SELECT insert_staff_b('".$staff ['insert_firstname']."'::varchar)"); If you are creating SQL functions y

Re: [SQL] [PHP] PL/pgSQL and PHP 5

2006-08-09 Thread PostgreSQL Admin
Thanks for the catch. I've tried: $connection->execute("SELECT insert_staff_b('$staff[insert_firstname]'::varchar)"); $connection->execute("SELECT insert_staff_b('".$staff['insert_firstname']."'::varchar)"); None work... I'm scratching my head on this one. Thanks, J

Re: [SQL] [PHP] PL/pgSQL and PHP 5

2006-08-09 Thread John DeSoi
On Aug 9, 2006, at 10:36 PM, PostgreSQL Admin wrote: select insert_staff_b('$_POST['firstname']::varchar) Still I get this error: Warning: pg_query(): Query failed: ERROR: function insert_staff_b (character varying) does not exist HINT: No function matches the given name and argument types

Re: [SQL] [PHP] [ADMIN] Data insert

2005-08-22 Thread Jim C. Nasby
On Sun, Aug 21, 2005 at 06:35:22AM +0100, Aldor wrote: > if you want to insert biiig data volumes try either using COPY instead > of INSERT - it will run much much faster And if for some reason you have to stick with inserts, group them into transactions; it will perform much better than individu

Re: [SQL] PHP postgres connections

2005-05-06 Thread Mauro Bertoli
Hi, Thank for your answers. I asked here because I had thought the problem was in how Postgres manage connections. Sorry --- Yasir Malik <[EMAIL PROTECTED]> ha scritto: > > Hi, > > I need to connect to 2 differents Postgres 8.0.0 > > databases located in the same machine using the > same > > PHP sc

Re: [SQL] PHP postgres connections

2005-04-30 Thread Volkan YAZICI
Hi, On 4/29/05, Mauro Bertoli <[EMAIL PROTECTED]> wrote: > I need to connect to 2 differents Postgres 8.0.0 > databases located in the same machine using the same > PHP script with an "db wrapper object" instance > (pg_Connect)... simply a PHP page with contemporarily > 2 database connections...

Re: [SQL] PHP postgres connections

2005-04-29 Thread Yasir Malik
Hi, I need to connect to 2 differents Postgres 8.0.0 databases located in the same machine using the same PHP script with an "db wrapper object" instance (pg_Connect)... simply a PHP page with contemporarily 2 database connections... I don't think this is the right place to ask this, but there's an

[SQL] PHP postgres connections

2005-04-29 Thread Mauro Bertoli
Hi, I need to connect to 2 differents Postgres 8.0.0 databases located in the same machine using the same PHP script with an "db wrapper object" instance (pg_Connect)... simply a PHP page with contemporarily 2 database connections... What's the best practice ? Can I use however persistent connec

Re: [SQL] php wrapper

2005-04-24 Thread John DeSoi
On Apr 21, 2005, at 8:00 AM, Mauro Bertoli wrote: Hi, I need a PHP wrapper for PostgreSQL... I found 1000 small "+/- identicals" wrappers but incompleted There's an "ufficial" or an suggested PHP wrapper? Why not use the built-in PHP functions for PostgreSQL? If by wrapper you mean an abstraction

[SQL] php wrapper

2005-04-22 Thread Mauro Bertoli
Hi, I need a PHP wrapper for PostgreSQL... I found 1000 small "+/- identicals" wrappers but incompleted There's an "ufficial" or an suggested PHP wrapper? ___ Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Ru

Re: [SQL] [PHP] Secure DB Systems - How to

2004-07-16 Thread Sarah Tanembaum
Thanks Bruno. I see the potential challenge. If the field value is encrypted, how can search be done for certain value? Do I have to seach for the encrypted value? If so, what password or key should I use? Thanks "Bruno Wolff III" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On

Re: [SQL] [PHP] Secure DB Systems - How to

2004-07-13 Thread Daniel Struck
> If you decrypt the data on the database, the sysadmin can see it. Hm, you are right. If one does decrypt the data on the database you have to sent the password to postgresql and so a administrator of the database could easily grasb the password. So the only way to go, would be to perform en/d

Re: [SQL] [PHP] Secure DB Systems - How to

2004-07-13 Thread Bruno Wolff III
On Tue, Jul 13, 2004 at 11:35:57 +0200, Daniel Struck <[EMAIL PROTECTED]> wrote: > > Keeping the system administrator from seeing the data while making it > > searchable is difficult. To do this you need to encrypt the data on > > the client side using a key the client has (and this key has to be

Re: [SQL] [PHP] Secure DB Systems - How to

2004-07-13 Thread Daniel Struck
> Keeping the system administrator from seeing the data while making it > searchable is difficult. To do this you need to encrypt the data on > the client side using a key the client has (and this key has to be > protected from loss) and the only searches you can do are equality > searches using a

Re: [SQL] [PHP] Secure DB Systems - How to

2004-07-09 Thread Bruno Wolff III
On Thu, Jul 08, 2004 at 11:49:36 -0400, Sarah Tanembaum <[EMAIL PROTECTED]> wrote: > I was wondering if it is possible to create a secure database system > usingPostgreSQL/PHP combination? > > I have the following in mind: > > I wanted to store all my( and my brothers and sisters) important doc

Re: [SQL] [PHP] faster output from php and postgres (one resolution)

2003-05-30 Thread Chadwick Rolfs
My solution to the problem stated below was to learn plpgsql, and write a function that loops through the returned records, concatenating a string together, and returning that string as the Author field. This function was actually e-mailed to me by a collegue, and I did a bit of doctoring (it still

Re: [SQL] [PHP] faster output from php and postgres

2003-05-27 Thread Chadwick Rolfs
Yes, this may be better than foreach()ing through each publication returned. But a plpgsql function may suit these needs much better. On Tue, 27 May 2003, Jean-Luc Lachance wrote: > KISS > > why not use PHP to concatenate the authors while pub_id is the same??? > If you insist on having each au

Re: [SQL] [PHP] faster output from php and postgres

2003-05-27 Thread Jean-Luc Lachance
KISS why not use PHP to concatenate the authors while pub_id is the same??? If you insist on having each author in its own column, put them at the end and concatenate with . jll Chadwick Rolfs wrote: > > So, I have the same problem, but I need all authors for each publication > to show up in

Re: [SQL] [PHP] faster output from php and postgres

2003-05-27 Thread Rod Taylor
On Tue, 2003-05-27 at 14:19, Richard Huxton wrote: > On Tuesday 27 May 2003 5:34 pm, Chadwick Rolfs wrote: > > So, I have the same problem, but I need all authors for each publication > > to show up in it's own column. I tried the full join query from a > > suggestion off pgsql-sql, but it only re

Re: [SQL] [PHP] faster output from php and postgres

2003-05-27 Thread Chadwick Rolfs
On Tue, 27 May 2003, Richard Huxton wrote: > On Tuesday 27 May 2003 5:34 pm, Chadwick Rolfs wrote: > > So, I have the same problem, but I need all authors for each publication > > to show up in it's own column. I tried the full join query from a > > suggestion off pgsql-sql, but it only returns O

Re: [SQL] [PHP] faster output from php and postgres

2003-05-27 Thread Richard Huxton
On Tuesday 27 May 2003 5:34 pm, Chadwick Rolfs wrote: > So, I have the same problem, but I need all authors for each publication > to show up in it's own column. I tried the full join query from a > suggestion off pgsql-sql, but it only returns ONE author id TWICE instead > of ALL authors at once.

Re: [SQL] [PHP] faster output from php and postgres

2003-05-27 Thread Chadwick Rolfs
So, I have the same problem, but I need all authors for each publication to show up in it's own column. I tried the full join query from a suggestion off pgsql-sql, but it only returns ONE author id TWICE instead of ALL authors at once. I'll do some RTFMing of the joins.. and post any results I g

[SQL] PHP LINK module (RPM format) for PostgreSQL V7.3

2003-03-30 Thread jack
Hi, All Please advise where I can get the PHP LINK module (RPM format) for PostgreSQL V7.3. Thank you in advance! Jack ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [SQL] [PHP] PEAR Problem

2001-10-15 Thread Dan Wilson
This is caused by the fact that PostgreSQL is case insensitive. In order for it to actually take the case into account, you need quote your field names and table names. So your query would then be: select "NetCode","NetworkName" from "NetworkTab"; Then you would be able to access the fields wit

Re: [SQL] [PHP] PEAR Problem

2001-10-15 Thread Papp Gyozo
Hi, maybe this problem isn't originated in PEAR, but in pg itself. Postgres folds everything to lowercase except one within "" (doublequotes). So, if you - ie.: in psql: psql=# CREATE TABLE veRYMixedCAse (NetCode integer,...); then actually you will create a table named 'verymixedcase'. In

Re: [SQL] [PHP] Need Help!!

2001-10-04 Thread Heather Johnson
Hi Gurudutt-- Concerning #1, I had a similar problem when porting data from mysql to psql. I finally ended up just using mysql's COPY command to get the data into delimited text form, then imported that into psql using its COPY command. This seems to me to be the easiest way to port over data if

Re: [SQL] php-nuke

2001-06-06 Thread Roberto Mello
On Wed, May 30, 2001 at 11:14:38PM +0530, Sharmad Naik wrote: > hi, > I wanted to know that does postgresql database support php-nuke This is a php-nuke question. Head to their website and it should be stated there somewhere. -Roberto -- +| http://fslc.usu.edu USU Free

[SQL] php-nuke

2001-06-05 Thread Sharmad Naik
hi, I wanted to know that does postgresql database support php-nuke -- Donot rely on the Operating System which don't have any sources for. -Seen somewhere on the Net ___ _ _ _ |_|_||_||_||\/||_|| \ _|| || || \| || ||_/