From: PostgreSQL Admin <postgres@productivitymedia.com>
To: Lista PG-PHP <pgsql-php@postgresql.org>
Cc: pgsql-sql@postgresql.org
Subject: PL/pgSQL and PHP 5
Date: Wed, 09 Aug 2006 22:36:19 -0400
Message-ID: <44DA9BA3.2020801@productivitymedia.com> (raw)
In-Reply-To: <bf05e51c0607310759m64d39c45n73aa6060c871b46f@mail.gmail.com>
References: <20060731041644.32247.qmail@web56610.mail.re3.yahoo.com>
<bf05e51c0607302152k2801caflc9040d99af7b2816@mail.gmail.com>
<7F7548C8-249E-44E2-8205-6C055671DA19@pgedit.com>
<bf05e51c0607310759m64d39c45n73aa6060c871b46f@mail.gmail.com>
I'm having this problem inserting data from my form using PL/pgSQL.
Here is the simplified version of my table and function (this example
does not work, also ):
CREATE TABLE theirry.sample (
staff_id serial PRIMARY KEY NOT NULL,
firstname varchar(100),
lastname varchar(150),
username varchar(35),
identifier varchar(40),
address2 varchar(180),
activated boolean,
activated_keys varchar(32)
);
CREATE OR REPLACE FUNCTION insert_staff_b
(insert_firstname varchar)
RETURNS VOID AS
$$
DECLARE
BEGIN
INSERT INTO theirry.sample
(firstname)
VALUES
(insert_firstname);
RETURN;
END;
$$
LANGUAGE plpgsql;
I have a form with a value firstname then call the query in php
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. You may need to add explicit
type casts.
Suggestions or maybe a place to read up on this problem.
Thanks in advance,
J
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: postgres@productivitymedia.com, pgsql-php@postgresql.org
Subject: Re: PL/pgSQL and PHP 5
In-Reply-To: <44DA9BA3.2020801@productivitymedia.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox