Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 6B02A635E7C for ; Wed, 22 Jul 2009 16:50:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 23233-02-6 for ; Wed, 22 Jul 2009 16:50:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from hartman.uits.indiana.edu (hartman.uits.indiana.edu [129.79.1.194]) by mail.postgresql.org (Postfix) with ESMTP id 0EC8E63545A for ; Wed, 22 Jul 2009 16:37:02 -0300 (ADT) Received: from mail-relay.iu.edu (burns.uits.indiana.edu [129.79.1.202]) by hartman.uits.indiana.edu (8.14.2/8.13.8/IU Messaging Team) with ESMTP id n6MJb1ex024653 for ; Wed, 22 Jul 2009 15:37:01 -0400 Received: from walter.slis.indiana.edu (walter.slis.indiana.edu [129.79.36.69]) (authenticated bits=0) by mail-relay.iu.edu (8.14.2/8.13.8/IU Messaging Team) with ESMTP id n6MJb04H025154 for ; Wed, 22 Jul 2009 15:37:01 -0400 Cc: pgsql-php@postgresql.org Message-Id: <07E5D103-2E8F-48EE-868E-8DAD10BE0C80@indiana.edu> From: Carol Walter In-Reply-To: <20090722152938.402f6228.wmoran@potentialtech.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: pg_query_params Date: Wed, 22 Jul 2009 15:37:00 -0400 References: <889FC92A-B6F2-4276-BFD7-E0061ACC73B6@indiana.edu> <20090722152938.402f6228.wmoran@potentialtech.com> X-Mailer: Apple Mail (2.935.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.793 tagged_above=-10 required=5 tests=AWL=-0.788, MISSING_HEADERS=1.581 X-Spam-Level: X-Archive-Number: 200907/7 X-Sequence-Number: 4037 No, I mean if I select select a name from the database but the name isn't found. I'm doing a log in form. I want to check to see if the user that's logging in exists in my database. I can check the number of rows returned or something like that, but I wondered if the function returns a false. Carol On Jul 22, 2009, at 3:29 PM, Bill Moran wrote: > In response to Carol Walter : > >> Does pg_query_params return a false if an item is not found in a >> database? > > What's an item? That term is does not describe any type of standard > database object. > > pg_query_params() will return false if the query was invalid for any > reason. One such possible reason is that you tried to access a > table that doesn't exist. > > If you're getting false as the return value, you should use > pg_last_error() to discover the details of the error. > > -- > Bill Moran > http://www.potentialtech.com > http://people.collaborativefusion.com/~wmoran/