Re: [GENERAL] php + postgresql

2008-07-26 Thread Joshua D. Drake
Tino Wildenhain wrote: Bill Wordsworth wrote: ... PHP is faster than Python, has a smaller memory foot-print than Python, has better SOAP features than Python, and is better suited for the web than Python. Python is better suited for the cli/mac/desktop/phone. Do you have proof for that? Or i

Re: [GENERAL] php + postgresql

2008-07-26 Thread Tino Wildenhain
Bill Wordsworth wrote: ... PHP is faster than Python, has a smaller memory foot-print than Python, has better SOAP features than Python, and is better suited for the web than Python. Python is better suited for the cli/mac/desktop/phone. Do you have proof for that? Or is this similar to "MySQL

Re: [GENERAL] php + postgresql

2008-07-26 Thread Bill Wordsworth
On Fri, Jul 25, 2008 at 4:29 PM, Bill Wordsworth <[EMAIL PROTECTED]> wrote: > years. It is newbies like him and fan-boys of Ruby/Python/Perl who > give PHP a bad name. But I fail to understand the little animosity > within some PostgreSQL users to PHP- is it the LAMP stack? On Fri, Jul 25, 2008 at

Re: [GENERAL] php + postgresql

2008-07-26 Thread Tino Wildenhain
Leif B. Kristensen wrote: On Friday 25. July 2008, Christophe wrote: ... My 2 cents: The prime reason for the popularity of PHP is probably the very gentle learning curve. You can start with a static HTML page, and introduce a few PHP snippets to show dynamic content. For us self-taught peop

Re: [GENERAL] php + postgresql

2008-07-26 Thread Tino Wildenhain
Joshua D. Drake wrote: On Sat, 2008-07-26 at 11:13 +0930, admin wrote: Anyway, while I'm quite happy to continue banging out things that "just work" in PHP for the time being, you suggest (in a subsequent post) that there is one scripting language in particular that you'd use ... might I enqu

Re: [GENERAL] php + postgresql

2008-07-26 Thread Tino Wildenhain
Hi, Aarni Ruuhimäki wrote: On Friday 25 July 2008 15:33, you wrote: I would avoid that in favour of using $HOME/.pgpass http://www.postgresql.org/docs/8.1/interactive/libpq-pgpass.html HTH Tino Hi, Quite right you are. Or something like this? require("/eg/unknown_path/deep_somewhere_els

Re: [GENERAL] php + postgresql

2008-07-25 Thread Joshua D. Drake
On Sat, 2008-07-26 at 11:13 +0930, admin wrote: > Anyway, while I'm quite happy to continue banging out things that "just > work" in PHP for the time being, you suggest (in a subsequent post) that > there is one scripting language in particular that you'd use ... might I > enquire which languag

Re: [GENERAL] php + postgresql

2008-07-25 Thread admin
Well no PHP is conceptual undisciplined and confusing. I would not compare this with Postgresql itself which is very professional developed with a great vision. PHP is just and always was a hack. I didn't mean to compare PG and PHP at the level of engineering quality, but to suggest that perh

Re: [GENERAL] php + postgresql

2008-07-25 Thread Scott Marlowe
On Fri, Jul 25, 2008 at 1:47 PM, Leif B. Kristensen <[EMAIL PROTECTED]> wrote: > On Friday 25. July 2008, Christophe wrote: > >>Most developers don't make deep informed decisions about PHP vs other >>languages. They use it because everyone else is, there is a huge >>ecosystem of support around it,

Re: [GENERAL] php + postgresql

2008-07-25 Thread Leif B. Kristensen
On Friday 25. July 2008, Christophe wrote: >Most developers don't make deep informed decisions about PHP vs other >languages. They use it because everyone else is, there is a huge >ecosystem of support around it, it's easy to get something flopping >around on the table quickly, and they know *for

Re: [GENERAL] php + postgresql

2008-07-25 Thread Jonathan Bond-Caron
On Fri Jul 25 02:20 PM, Andrew Sullivan wrote: > On Fri, Jul 25, 2008 at 01:41:50PM -0400, Jonathan Bond-Caron wrote: > >> Uhm, let's not start a PHP debate. > > The post would have been more effective if you'd stopped there ;-) Agreed :) > That said, > >> I'd say "the Web is just and always w

Re: [GENERAL] php + postgresql

2008-07-25 Thread Tino Wildenhain
Andrew Sullivan wrote: On Fri, Jul 25, 2008 at 01:41:50PM -0400, Jonathan Bond-Caron wrote: Uhm, let's not start a PHP debate. Well it was just a innocent question since the original poster did not seem to know the language of choice good enough to solve this rather basic problem. (Note, ho

Re: [GENERAL] php + postgresql

2008-07-25 Thread Christophe
On Jul 25, 2008, at 11:20 AM, Andrew Sullivan wrote: On Fri, Jul 25, 2008 at 01:41:50PM -0400, Jonathan Bond-Caron wrote: I'd say "the Web is just and always was a hack" I have to object to this pretty strongly. He has a point, though. If you were starting out to build a user interface

Re: [GENERAL] php + postgresql

2008-07-25 Thread Andrew Sullivan
On Fri, Jul 25, 2008 at 01:41:50PM -0400, Jonathan Bond-Caron wrote: > Uhm, let's not start a PHP debate. The post would have been more effective if you'd stopped there ;-) That said, > I'd say "the Web is just and always was a hack" I have to object to this pretty strongly. What premises d

Re: [GENERAL] php + postgresql

2008-07-25 Thread Joshua D. Drake
On Fri, 2008-07-25 at 13:41 -0400, Jonathan Bond-Caron wrote: > On Fri Jul 25 01:03 PM, Joshua D. Drake wrote: > I use .NET, java and PHP and with experience you learn to use/speak the > right language for the job. "hack" languages sometimes get the job done > faster. You seemed to have complete

Re: [GENERAL] php + postgresql

2008-07-25 Thread Jonathan Bond-Caron
On Fri Jul 25 01:03 PM, Joshua D. Drake wrote: > On Fri, 2008-07-25 at 12:29 -0400, Bill Wordsworth wrote: >> Obviously he is a newbie out of the woods- couldn't make a connection >> and print results something that the rest of us have been doing for >> years. It is newbies like him and fan-boys

Re: [GENERAL] php + postgresql

2008-07-25 Thread Joshua D. Drake
On Fri, 2008-07-25 at 12:29 -0400, Bill Wordsworth wrote: > Obviously he is a newbie out of the woods- couldn't make a connection > and print results something that the rest of us have been doing for > years. It is newbies like him and fan-boys of Ruby/Python/Perl who > give PHP a bad name. No, it

Re: [GENERAL] php + postgresql

2008-07-25 Thread Scott Marlowe
I too don't get the animosity. it's not like you can't write bad code in perl, java, ruby or python. The real issue is the quality of the programmer. On Fri, Jul 25, 2008 at 10:29 AM, Bill Wordsworth <[EMAIL PROTECTED]> wrote: > Obviously he is a newbie out of the woods- couldn't make a connecti

Re: [GENERAL] php + postgresql

2008-07-25 Thread Bill Wordsworth
Obviously he is a newbie out of the woods- couldn't make a connection and print results something that the rest of us have been doing for years. It is newbies like him and fan-boys of Ruby/Python/Perl who give PHP a bad name. But I fail to understand the little animosity within some PostgreSQL user

Re: [GENERAL] php + postgresql

2008-07-25 Thread Joshua D. Drake
On Fri, 2008-07-25 at 17:40 +0200, Tino Wildenhain wrote: > Hi, > > > I think that PHP (like PostgreSQL, perhaps?) suffers from a reputation > > hangover from years ago. PostgreSQL was supposedly "slow", PHP is > > supposedly "undisciplined" and "unprofessional". You sure can still > > Well n

Re: [GENERAL] php + postgresql

2008-07-25 Thread Tino Wildenhain
Hi, admin wrote: Is there any special reason to use PHP? There are a couple other scripting languages useable for the web which do all have better abstration available. (afaic even PHP does have some more abstration to just using pg* functions) Well, yes, there are alternatives of course and

Re: [GENERAL] php + postgresql

2008-07-25 Thread admin
Is there any special reason to use PHP? There are a couple other scripting languages useable for the web which do all have better abstration available. (afaic even PHP does have some more abstration to just using pg* functions) Well, yes, there are alternatives of course and I could write this

Re: [GENERAL] php + postgresql

2008-07-25 Thread Aarni Ruuhimäki
On Friday 25 July 2008 15:33, you wrote: > > I would avoid that in favour of using $HOME/.pgpass > > http://www.postgresql.org/docs/8.1/interactive/libpq-pgpass.html > > HTH > Tino Hi, Quite right you are. Or something like this? require("/eg/unknown_path/deep_somewhere_else/dbconnect_app_name.

Re: [GENERAL] php + postgresql

2008-07-25 Thread Tino Wildenhain
Aarni Ruuhimäki wrote: ... Not sure what causes this with your server but I always use something like this, ie first connect then do your stuff and then close the connection: require("dbconnect.inc"); // holds the $conn which is pg_connect("with passes") I would avoid that in favour of using

Re: [GENERAL] php + postgresql

2008-07-25 Thread Tino Wildenhain
Hi, admin wrote: Thanks again for replies. I know those questions were pretty vague. I need to set up some methodical test scripts that replicate my problems, so that it is clear what is going on. There does seem to be some evidence of problems historically with PHP and persistent connection

Re: [GENERAL] php + postgresql

2008-07-25 Thread Bill Moran
In response to Chris <[EMAIL PROTECTED]>: > > > There does seem to be some evidence of problems historically with PHP > > and persistent connections in PostgreSQL, on the PHP forums. The advice > > is typically to avoid them. > > You'll find the same advice for mysql + persistent connections or a

Re: [GENERAL] php + postgresql

2008-07-25 Thread admin
You need something like this: $query = "select id, name from tablename"; $result = pg_query($query); while ($row = pg_fetch_array($result)) { $content = $row[0]; } That's actually what I was using. The scoping wasn't the issue either. Today I switched back to pg_connect() from pg_pconnect(),

Re: [GENERAL] php + postgresql

2008-07-24 Thread Chris
> 2. > Another problem was that no matter how many times I checked and > re-checked code, or which pg_fetch_* function I used, copying an array > member and trying to use it later just would not work, eg > > while ($row = pg_fetch_array($query)) { > $content = $row[0] > } > > echo $content;

Re: [GENERAL] php + postgresql

2008-07-24 Thread Chris
> There does seem to be some evidence of problems historically with PHP > and persistent connections in PostgreSQL, on the PHP forums. The advice > is typically to avoid them. You'll find the same advice for mysql + persistent connections or any other db + persistent connections. It's not a php+p

Re: [GENERAL] php + postgresql

2008-07-24 Thread Aarni Ruuhimäki
On Thursday 24 July 2008 12:41, admin wrote: > 1. > I ended up using pg_prepare() and pg_execute() as pg_query() alone just > didn't seem to work. But SELECT statements seemed to be cached or > persistent in some way, such that they "lived" beyond the life of the > PHP script. Is there something I

Re: [GENERAL] php + postgresql

2008-07-24 Thread Scott Marlowe
On Thu, Jul 24, 2008 at 6:33 AM, admin <[EMAIL PROTECTED]> wrote: > Thanks again for replies. > I know those questions were pretty vague. > I need to set up some methodical test scripts that replicate my problems, so > that it is clear what is going on. > > There does seem to be some evidence of pr

Re: [GENERAL] php + postgresql

2008-07-24 Thread Ivan Sergio Borgonovo
On Thu, 24 Jul 2008 11:13:52 -0400 "David Spadea" <[EMAIL PROTECTED]> wrote: > Mick, > > As I haven't seen anyone else say it, I just wanted to throw this > in. > > I'm not a PHP programmer, so I'm not very sure of PHP's scoping > rules, but this looks to me like a variable scoping problem. If >

Re: [GENERAL] php + postgresql

2008-07-24 Thread David Spadea
Mick, As I haven't seen anyone else say it, I just wanted to throw this in. I'm not a PHP programmer, so I'm not very sure of PHP's scoping rules, but this looks to me like a variable scoping problem. If the first time you've used $content is inside of the while(), it's probably going out of scop

Re: [GENERAL] php + postgresql

2008-07-24 Thread admin
Thanks again for replies. I know those questions were pretty vague. I need to set up some methodical test scripts that replicate my problems, so that it is clear what is going on. There does seem to be some evidence of problems historically with PHP and persistent connections in PostgreSQL, on

Re: [GENERAL] php + postgresql

2008-07-24 Thread Ivan Sergio Borgonovo
On Thu, 24 Jul 2008 12:30:22 +0200 "Leif B. Kristensen" <[EMAIL PROTECTED]> wrote: > On Thursday 24. July 2008, admin wrote: > >while ($row = pg_fetch_array($query)) { > > $content = $row[0] > >} > > > >echo $content; > > > >$content was always 'undeclared'. > > You have to use an intermediate

Re: [GENERAL] php + postgresql

2008-07-24 Thread Ivan Sergio Borgonovo
On Thu, 24 Jul 2008 19:11:36 +0930 admin <[EMAIL PROTECTED]> wrote: > 2. > Another problem was that no matter how many times I checked and > re-checked code, or which pg_fetch_* function I used, copying an > array member and trying to use it later just would not work, eg > > while ($row = pg_fet

Re: [GENERAL] php + postgresql

2008-07-24 Thread Leif B. Kristensen
On Thursday 24. July 2008, admin wrote: >It seems that some of PHP's PG functions have changed recently, are >there any known issues with them? I've been using PHP with PostgreSQL for 5 years, and haven't noticed any substantial changes. >while ($row = pg_fetch_array($query)) { > $content = $

Re: [GENERAL] php + postgresql

2008-07-24 Thread Raymond O'Donnell
On 24/07/2008 11:13, Raymond O'Donnell wrote: $rs = pg_query($sql_string); while ($row = pg_fetch_assoc($rs) Whoops! - while ($row = pg_fetch_assoc($rs)) Ray. -- Raymond O'Donnell, Director of Music, Galway Cathedra

Re: [GENERAL] php + postgresql

2008-07-24 Thread adam_pgsql
Hi Mick, 1. I ended up using pg_prepare() and pg_execute() as pg_query() alone just didn't seem to work. But SELECT statements seemed to be cached or persistent in some way, such that they "lived" beyond the life of the PHP script. Is there something I need to know about persistent behav

Re: [GENERAL] php + postgresql

2008-07-24 Thread Richard Huxton
admin wrote: First, thanks to everyone who responded to my newbie questions yesterday, all clear now. I spent most of today struggling with apparently inconsistent behaviour while running SELECT statements on PG 8.1.9 using PHP 5.1.6 (these are both as supplied with CentOS 5.1, a fairly conse

Re: [GENERAL] php + postgresql

2008-07-24 Thread Raymond O'Donnell
On 24/07/2008 10:41, admin wrote: I ended up using pg_prepare() and pg_execute() as pg_query() alone just didn't seem to work. But SELECT statements seemed to be cached or persistent in some way, such that they "lived" beyond the life of the PHP script. Is there something I need to know about

Re: [GENERAL] php + postgresql

2008-07-24 Thread Craig Ringer
admin wrote: > First, thanks to everyone who responded to my newbie questions > yesterday, all clear now. > > I spent most of today struggling with apparently inconsistent behaviour > while running SELECT statements on PG 8.1.9 using PHP 5.1.6 (these are > both as supplied with CentOS 5.1, a fairl

[GENERAL] php + postgresql

2008-07-24 Thread admin
First, thanks to everyone who responded to my newbie questions yesterday, all clear now. I spent most of today struggling with apparently inconsistent behaviour while running SELECT statements on PG 8.1.9 using PHP 5.1.6 (these are both as supplied with CentOS 5.1, a fairly conservative distro

Re: [GENERAL] php + postgresql website ?

2008-07-04 Thread Asko Oja
http://www.skype.com/ On Tue, Jul 1, 2008 at 12:18 PM, Clemens Schwaighofer <[EMAIL PROTECTED]> wrote: > > > --On Monday, June 30, 2008 08:06:25 PM +0800 paragasu <[EMAIL PROTECTED]> > wrote: > > i can name a lot of website written in mysql and php. >> currently, i am planning to use postgresql

Re: [GENERAL] php + postgresql website ?

2008-07-01 Thread Clemens Schwaighofer
--On Monday, June 30, 2008 08:06:25 PM +0800 paragasu <[EMAIL PROTECTED]> wrote: i can name a lot of website written in mysql and php. currently, i am planning to use postgresql database for my next project. i know there is a lot of testimonial about postgresql is better than mysql. can anyo

Re: [GENERAL] php + postgresql website ?

2008-06-30 Thread Scott Marlowe
On Mon, Jun 30, 2008 at 1:38 PM, paragasu <[EMAIL PROTECTED]> wrote: > i am very surprise to see skype use postgresql database at their database. > it really make me confident about postgresql. the only problem with > postgresql is that not > many $5/month hosting out there preinstalled with postgr

Re: [GENERAL] php + postgresql website ?

2008-06-30 Thread Greg Smith
On Tue, 1 Jul 2008, paragasu wrote: the only problem with postgresql is that not many $5/month hosting out there preinstalled with postgresql. There is a list of hosting providers at http://www.postgresql.org/support/professional_hosting I clicked on the first North American one there, A2 H

Re: [GENERAL] php + postgresql website ?

2008-06-30 Thread paragasu
i am very surprise to see skype use postgresql database at their database. it really make me confident about postgresql. the only problem with postgresql is that not many $5/month hosting out there preinstalled with postgresql. i only have access to postgresql database after i buy a vps hosting so

Re: [GENERAL] php + postgresql website ?

2008-06-30 Thread Chandra ASGI Tech
Skype uses PostgreSQL as its backend. http://highscalability.com/skype-plans-postgresql-scale-1-billion-users C.S.Chandrasekkar On Mon, Jun 30, 2008 at 8:06 AM, paragasu <[EMAIL PROTECTED]> wrote: > i can name a lot of website written in mysql and php. > currently, i am planning to use postgresq

Re: [GENERAL] php + postgresql website ?

2008-06-30 Thread Dimitri Fontaine
Le lundi 30 juin 2008, paragasu a écrit : > i can name a lot of website written in mysql and php. > currently, i am planning to use postgresql database for my next > project. i know there is a lot of testimonial about postgresql is > better than mysql. > can anyone please give me an example of webs

Re: [GENERAL] php + postgresql website ?

2008-06-30 Thread Ian Meyer
http://board.crewcial.org currently in flux as we're finishing up a dev version, but we've been running postgres since 7.4, currently on 8.1.. with around 7 million rows of data totaling a few GB. traffic is around 300k hits a day. nothing crazy, but it works really well. - ian On Mon, Jun 30,

[GENERAL] php + postgresql website ?

2008-06-30 Thread paragasu
i can name a lot of website written in mysql and php. currently, i am planning to use postgresql database for my next project. i know there is a lot of testimonial about postgresql is better than mysql. can anyone please give me an example of website using postgresql database? -- Sent via pgsql-g

Re: [GENERAL] php postgresql

2006-03-02 Thread Russell Smith
Mary Adel wrote: I am wondering how i can call stored procedure from php If anyone can help it would great for me Very small code snippet. $sql = "SELECT my_func('para')"; $Result = pg_query($sql); ... Regards Russell Smith ---(end of broadcast)-

[GENERAL] php postgresql

2006-03-02 Thread Mary Adel
I am wondering how i can call stored procedure from php If anyone can help it would great for me Thanks Mary ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] php + postgresql pg_connect problem

2005-12-14 Thread Richard Huxton
John Taber wrote: You are using "ident" authentication in your pg_hba.conf file. You probably don't want this. Start with trust if you are connecting locally, then turn passwords on once you are happy you can connect. Thks for directing me to the pg_hda file - I have made the changes - But I

Re: [GENERAL] php + postgresql pg_connect problem

2005-12-13 Thread John Taber
Richard Huxton wrote: John Taber wrote: I am having trouble connecting php(5.1.1) and postgresql(8.1) running on Ubuntu Breezy. Both run fine separately. I created a user (tempuser) and a database (tempdb). If I run psql -l it shows the database "tempdb" with the username "tempuser". But I ge

Re: [GENERAL] php + postgresql pg_connect problem

2005-12-13 Thread Richard Huxton
John Taber wrote: I am having trouble connecting php(5.1.1) and postgresql(8.1) running on Ubuntu Breezy. Both run fine separately. I created a user (tempuser) and a database (tempdb). If I run psql -l it shows the database "tempdb" with the username "tempuser". But I get the following error us

[GENERAL] php + postgresql pg_connect problem

2005-12-13 Thread John Taber
I am having trouble connecting php(5.1.1) and postgresql(8.1) running on Ubuntu Breezy. Both run fine separately. I created a user (tempuser) and a database (tempdb). If I run psql -l it shows the database "tempdb" with the username "tempuser". But I get the following error using pg_connect: Wa

[GENERAL] php & postgresql data type

2001-02-03 Thread Denni
hi I'm newbie here, I've a little knowledge about postgresql. I'm planning to make a project for my school's assignment about php using PostgreSQL as the database server. I'm planning to use arrays data type and inheritance in PostgreSQL. My question is can php3/php support this feature? Tha