PL/pgSQL and PHP 5
От | PostgreSQL Admin |
---|---|
Тема | PL/pgSQL and PHP 5 |
Дата | |
Msg-id | 44DA9BA3.2020801@productivitymedia.com обсуждение исходный текст |
Ответы |
Re: PL/pgSQL and PHP 5
Re: [SQL] PL/pgSQL and PHP 5 |
Список | pgsql-php |
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
В списке pgsql-php по дате отправления: