array syntax in pg_execute call
От | G. J. Walsh |
---|---|
Тема | array syntax in pg_execute call |
Дата | |
Msg-id | 1205367826.6905.18.camel@www.dscdirectionalservices.com обсуждение исходный текст |
Ответы |
Re: array syntax in pg_execute call
|
Список | pgsql-novice |
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 documentation 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
В списке pgsql-novice по дате отправления: