From: | Jeff Silberberg <jms(at)dapage(dot)net> |
---|---|
To: | pgsql-php(at)postgresql(dot)org |
Subject: | Looking for some assistance / guidance -- |
Date: | 2014-07-29 00:45:06 |
Message-ID: | CALWasQ=LmiZsZdJ1sLUT4jWrULSOLNsGS298yLkafKbEppbEHQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
Good evening --
I have a Wordpress / HTML form that includes <select size="5" multiple
name=Keys[]"....>
The form calls a PHP CGI program and if I set it to phpinfo() I see that
the array Keys is in the post data. An I can do a $selectedKeys =
$_POST('Keys') and walk through and echo out the array elements without a
problem.
My issues start when I attempt to pass the array of Keys to my PostgreSql
function with a parameter list of (web_Keys_ integer[], web_text_ text,
web_user_ text) ................
in my php I do a pg_connect, and then prepare a number of statements all of
which work but the last one.
it is $return_cde = pg_prepare($conn, "SendKeys", 'select
web.sendKeys$1, $2, $3)');.
and I try to execute this with
$userKey=$_POST['Keys'];
$userText=$_POST['msgText'] . " / " . $current_user->display_name;
$return = pg_execute($conn, "SendKeys", array($userKey, $userText,
$current_user->display_name));
Which returns and error --
function.pg-execute <http://dispatch.dapage.net/cgi-bin/function.pg-execute>]:
Query failed: ERROR: array value must start with "{" or dimension
information in */home/xxxxxxx/public_html/enterkey/cgi-bin/xxxxxxcgi.php*
on line *90*
echo "User Keys " . gettype($userKey)."<br>\n"; confirms this is a
Array .. An I have tried casting $1::int[] in the prepare with no
luck..
I find a lot of hits on Google searches but no solutions..
Hoping someone here can assist me with this issue..
=============
From | Date | Subject | |
---|---|---|---|
Next Message | Matthias Ritzkowski | 2014-07-29 01:03:47 | Re: Looking for some assistance / guidance -- |
Previous Message | Vincent | 2014-04-09 17:17:24 | Re: html display images without intermediate file |