From sean712@gmail.com Fri Oct 10 17:30:36 2008 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 3588A37C031 for ; Fri, 10 Oct 2008 14:30:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 50650-08 for ; Fri, 10 Oct 2008 14:30:33 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f16.google.com (mail-gx0-f16.google.com [209.85.217.16]) by postgresql.org (Postfix) with ESMTP id D60A337BFF5 for ; Fri, 10 Oct 2008 14:30:32 -0300 (ADT) Received: by gxk9 with SMTP id 9so338915gxk.19 for ; Fri, 10 Oct 2008 10:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=u11H0jDkS39SLSnWDQbVMzaUKdORI/7t2yfRvFEsFnY=; b=s6px8N8TS7P9uJAgpXnuIevO2XfoTFgD3IB/GTIZiaSmE77rgqgz23SGN4Xv4EwTPA mD7rP5xRZbu+RVHZUxkCLhbwmXTUCs6xQXxLsLISVvHMzaWkK76FQi6EA5haV1od44ap jNoyNJzcLJc/gyzWP3BL7/9mJm+6wKb7OovKg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=kf/vluKw9ZbbMzZSprJSCMStrX2gMlxQUaoBOYs9eLa/hvcUxbWWJqFZvd94HSbo50 +Xlzl1TbRHdCOgsBMtLI2bPONlQadNGLOY+zS/OXr/xWfO+WUXR3qXQYwpsDRjV4Jb+U eOaogHsD/1yGJ+90Mzz5N5bYNeT6M5Eq/RVNI= Received: by 10.142.140.14 with SMTP id n14mr919481wfd.164.1223659831347; Fri, 10 Oct 2008 10:30:31 -0700 (PDT) Received: by 10.143.156.2 with HTTP; Fri, 10 Oct 2008 10:30:31 -0700 (PDT) Message-ID: Date: Fri, 10 Oct 2008 13:30:31 -0400 From: Sean To: pgsql-php@postgresql.org Subject: ERROR: relation "userroles" does not exist MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_130355_4313784.1223659831206" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.5 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001, WEIRD_PORT=1.499 X-Spam-Level: * X-Archive-Number: 200810/5 X-Sequence-Number: 3902 ------=_Part_130355_4313784.1223659831206 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline *Hello All, *I keep receiving the following when trying to select from a table in my database. the Tables are there i see them in pgAdmin... *Warning*: pg_query_params() [function.pg-query-params]: Query failed: ERROR: relation "userroles" does not exist The query I'm running is SELECT userPassword, salt, roleName FROM User u, UserRoles ur, Roles r where u.id = ur.user_id and r.id = ur.role_id and u.username = $1 and u.active = true ------=_Part_130355_4313784.1223659831206 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hello All,

I keep receiving the following when trying to select from a table in my database. the Tables are there i see them in pgAdmin...


Warning: pg_query_params() [function.pg-query-params]: Query failed: ERROR: relation "userroles" does not exist

The query I'm running is

SELECT userPassword, salt, roleName
            FROM User u,  UserRoles ur, Roles r
            where u.id = ur.user_id
            and r.id = ur.role_id
            and u.username = $1
            and u.active = true



------=_Part_130355_4313784.1223659831206-- From rod@iol.ie Fri Oct 10 18:17:16 2008 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2689037C031 for ; Fri, 10 Oct 2008 15:17:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 60603-05 for ; Fri, 10 Oct 2008 15:17:13 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail11.svc.cra.dublin.eircom.net (mail11.svc.cra.dublin.eircom.net [159.134.118.27]) by postgresql.org (Postfix) with SMTP id D8C0037C01B for ; Fri, 10 Oct 2008 15:17:12 -0300 (ADT) Received: (qmail 67800 messnum 6766213 invoked from network[86.46.57.34/unknown]); 10 Oct 2008 18:17:10 -0000 Received: from unknown (HELO ?127.0.0.1?) (86.46.57.34) by mail11.svc.cra.dublin.eircom.net (qp 67800) with SMTP; 10 Oct 2008 18:17:10 -0000 Message-ID: <48EF9C24.40201@iol.ie> Date: Fri, 10 Oct 2008 19:17:08 +0100 From: Raymond O'Donnell Reply-To: rod@iol.ie User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Sean CC: pgsql-php@postgresql.org Subject: Re: ERROR: relation "userroles" does not exist References: In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 081010-0, 10/10/2008), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.499 tagged_above=0 required=5 tests=WEIRD_PORT=1.499 X-Spam-Level: * X-Archive-Number: 200810/6 X-Sequence-Number: 3903 On 10/10/2008 18:30, Sean wrote: > *I keep receiving the following when trying to select from a table in my > database. the Tables are there i see them in pgAdmin... > > *Warning*: pg_query_params() [function.pg-query-params > ]: Query failed: > ERROR: relation "userroles" does not exist Would you have defined the table using quoted upper-case? PG folds names to lower-case unless you double quote them, so: test=# create table test(); CREATE TABLE test=# create table "Test"(); CREATE TABLE test=# \dt List of relations Schema | Name | Type | Owner --------+------+-------+---------- public | Test | table | postgres public | test | table | postgres (2 rows) Ray. ------------------------------------------------------------------ Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland rod@iol.ie Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals ------------------------------------------------------------------ From sean712@gmail.com Fri Oct 10 20:03:49 2008 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B93A937C69C for ; Fri, 10 Oct 2008 17:03:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 82581-06 for ; Fri, 10 Oct 2008 17:03:46 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.247]) by postgresql.org (Postfix) with ESMTP id 86D8D37BF16 for ; Fri, 10 Oct 2008 17:03:46 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id d30so84974and.33 for ; Fri, 10 Oct 2008 13:03:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=IxWg6FvJeKVJVjqBRrHxhI1iokHkmcMFHPSVpnvW3Bg=; b=FCsKhHFrxmjNzNlRDmVe/JA5yWpKseV/tj2vM4cDsE+qXAqOABMjPzBBKuOaWLICKH TRWyUm4QN6cb7kzkGalwkGYhGb2+7hVqo/s900DgNrghxuoqNblLmtOxC3RX3nzZhEFC B83NxJcgv87p4Au0sZ24+14xxX+cgtA5Eo1wo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=lukuo/JVN+9EZ8FmPboErgtq4qP4ROEG9XtFli57OHiHRelXrzAbBSPUCowqnWtr0J hZ2SkrH48WI5cSWBCCiZaA1ns0XHFR78hblB19da+cm2XugbO4d/3Snm2laJAFP8gng6 mY66kRKvTNJIhDV+AOZ0iSYPhe4aHmB1gQbDU= Received: by 10.143.12.19 with SMTP id p19mr1015018wfi.171.1223669024891; Fri, 10 Oct 2008 13:03:44 -0700 (PDT) Received: by 10.143.156.2 with HTTP; Fri, 10 Oct 2008 13:03:44 -0700 (PDT) Message-ID: Date: Fri, 10 Oct 2008 16:03:44 -0400 From: Sean To: rod@iol.ie Subject: Re: ERROR: relation "userroles" does not exist Cc: pgsql-php@postgresql.org In-Reply-To: <48EF9C24.40201@iol.ie> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_133012_18133933.1223669024736" References: <48EF9C24.40201@iol.ie> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.5 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001, WEIRD_PORT=1.499 X-Spam-Level: * X-Archive-Number: 200810/7 X-Sequence-Number: 3904 ------=_Part_133012_18133933.1223669024736 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline That's it. thank you.. I created it using PgAdmin. On Fri, Oct 10, 2008 at 2:17 PM, Raymond O'Donnell wrote: > On 10/10/2008 18:30, Sean wrote: > > *I keep receiving the following when trying to select from a table in my > > database. the Tables are there i see them in pgAdmin... > > > > *Warning*: pg_query_params() [function.pg-query-params > > ]: Query failed: > > ERROR: relation "userroles" does not exist > > Would you have defined the table using quoted upper-case? PG folds names > to lower-case unless you double quote them, so: > > test=# create table test(); > CREATE TABLE > test=# create table "Test"(); > CREATE TABLE > test=# \dt > List of relations > Schema | Name | Type | Owner > --------+------+-------+---------- > public | Test | table | postgres > public | test | table | postgres > (2 rows) > > > Ray. > > ------------------------------------------------------------------ > Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland > rod@iol.ie > Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals > ------------------------------------------------------------------ > ------=_Part_133012_18133933.1223669024736 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
That's it. thank you..  I created it using PgAdmin. 

On Fri, Oct 10, 2008 at 2:17 PM, Raymond O'Donnell <rod@iol.ie> wrote:
On 10/10/2008 18:30, Sean wrote:
> *I keep receiving the following when trying to select from a table in my
> database. the Tables are there i see them in pgAdmin...
>
> *Warning*: pg_query_params() [function.pg-query-params
> <http://localhost:8888/HH/function.pg-query-params>]: Query failed:
> ERROR: relation "userroles" does not exist

Would you have defined the table using quoted upper-case? PG folds names
to lower-case unless you double quote them, so:

test=# create table test();
CREATE TABLE
test=# create table "Test"();
CREATE TABLE
test=# \dt
       List of relations
 Schema | Name | Type  |  Owner
--------+------+-------+----------
 public | Test | table | postgres
 public | test | table | postgres
(2 rows)


Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

------=_Part_133012_18133933.1223669024736--