Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > array syntax in...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 3037 of 3323
Post > Topic >>

array syntax in pg_execute call

by gjwalsh@[EMAIL PROTECTED] ("G. J. Walsh") Mar 12, 2008 at 05:23 PM

I have a complex php form which initializes rows in 4 tables. In each
case I have employed prepared statements. In the first 3 everything
works beautifully with as many as 45 columns involved. 

The 4th table (badtest) is driving me around the bend. Simplified, the
schema would be:

testcode CHAR[10] not null primary key
testrank SMALLINT[]
testraw SMALLINT[]

And the script is:

$query = "INSERT INTO badtest(testcode,testrank,testraw) VALUES($1,$2,
$3)";
$result = pg_prepare($pg,"initbadtest",$query) or die('as usual');
pg_execute($pg,"initbadtest",array(testcode,'{0,0,0,0,0,0}','{0,0,0,0,0,0}));

The only difference is the presence of arrays. 

Inclusion of this script stops the firm from being diplayed, but there
are no logged items either for the system errorlog or postgresql
itself. 

So 'die' does its job, so to speak, but what am I doing wrong here? The
do***entation for 8.3 section 14 mentions this array syntax is similar
to 'C'. Yes, it is, but that is small comfort. I also tried the
ARRAY[0.0.0.0.0.0] style but the same problem - no display. Remove the
code and the script 'does it thing'.

Has to be simple, but I can no longer see for looking.

George

-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 3 Posts in Topic:
array syntax in pg_execute call
gjwalsh@[EMAIL PROTECTED]  2008-03-12 17:23:46 
Re: array syntax in pg_execute call
vka@[EMAIL PROTECTED] (&  2008-03-13 04:34:20 
Re: array syntax in pg_execute call
gjwalsh@[EMAIL PROTECTED]  2008-03-12 23:16:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 5:18:50 CST 2008.