Hi Jpadie,
Thank you very very much. It works fine when I changed from int8[] and float8[] to numeric and text[]to varchar. All this while it has been a postgres proiblem and not the script you gave me.
This is the message:
Database Record inserted correctly
thanks very much again
Gokop
Hi,
I changed the criteria_parameters to Criteria_Parameters and see the error:
Warning: pg_query(): Query failed: ERROR: relation "criteria_parameters" does not exist in /var/www/html/newconnection.php on line 61
Problem inserting database record. Error was ERROR: relation...
Hi Jpadie,
My first postgres table was Criteria_Parameters and columns were 'CriteriaID', 'DomainID', 'Criteria_Name', 'Upper_Lim', 'Lower_Lim', 'Range', 'Unit'. But after running the php script it complains. I went through the postgres documentation and I saw that the script converts all names...
In postgres, I declared the table fields data types as:
criteriaid as int8[]
domainid as int8[]
criteria_name as text[]
upper_lim as float8[]
lower_lim as float8[]
range as float8[]
unit as text[]
Has this got anything to do with the error. Anyway they were declaed as int8, float8 and text...
Hi, It gave this error:
Warning: pg_query(): Query failed: ERROR: array value must start with "{" or dimension information in /var/www/html/newconnection.php on line 62
Problem inserting database record. Error was ERROR: array value must start with "{" or dimension information
in line 62 i.e...
By commenting the $fields = implode (" , ", $fields); below foreach and above $query, I got:
Warning: pg_query(): Query failed: ERROR: syntax error at or near "Array" at character 34 in /var/www/html/newconnection.php on line 62
Problem inserting database record. Error was ERROR: syntax error...
Hi Thanks,
Without changing anything, I got:
Warning: implode(): Bad arguments. in /var/www/html/newconnection.php on line 51
Warning: implode(): Bad arguments. in /var/www/html/newconnection.php on line 51
Warning: implode(): Bad arguments. in /var/www/html/newconnection.php on line 51...
Hi Jpadie,
See the codes:
<?php
//set the debug parameters
ini_set('display_errors','on');
error_reporting (E_ALL);
//start the motor
switchboard();
function switchboard(){
if (isset($_POST['submit'])){
processForm();
}
displayForm();
}
function displayForm(){
echo...
You have done so well Jpadie. I did that and got this error:
Warning: implode(): Bad arguments. in /var/www/html/newconnection.php on line 50
Warning: implode(): Bad arguments. in /var/www/html/newconnection.php on line 50
Warning: implode(): Bad arguments. in /var/www/html/newconnection.php...
Yes that solves the problem also. I got some errors such as criteria_parameters relations, but I solved them. The error is :
Warning: pg_query(): Query failed: ERROR: array value must start with "{" or dimension information in /var/www/html/newconnection.php on line 60
Problem inserting...
Itried to comment the is_binary and leave the is_string. I got this error:
Warning: pg_query(): Query failed: ERROR: array value must start with "{" or dimension information in /var/www/html/newconnection.php on line 60
Problem inserting database record. Error was ERROR: array value must start...
Hi Jpadie,
Thanks. At least I saw errors now with this change in the input button type. See errors displayed on the browser:
Warning: Invalid argument supplied for foreach() in /var/www/html/newconnect.php on line 49
Notice: Undefined variable: dbValues in /var/www/html/newconnect.php on line...
Hi Jpadie,
It looks ok, however it does not insert data into the table. I have even granted insert, select, udate priviledges to the globus user.
I will try working on configurations in httpd.conf and php.ini and see what happens.
Thanks for your great help.
Gokop
Sorry I mean the recent /opt/pgsql/logfile
LOG: database system was shut down at 2007-12-12 13:24:47 GMT
LOG: checkpoint record is at 0/CDDA90
LOG: redo record is at 0/CDDA90; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 392899; next OID: 17339
LOG: database system is ready
Yes I have logfile in postgresql. Not sure of webserver.
This is the reason /opt/pgsql/logfile infomation:
LOG: database system was shut down at 2007-12-12 13:24:47 GMT
LOG: checkpoint record is at 0/CDDA90
LOG: redo record is at 0/CDDA90; undo record is at 0/0; shutdown TRUE
LOG: next...
Hi Jpadie,
That is what I am doing, sending results to the browser. I have 2 files (criteria.htm which implements the form to enter the data and insert.php which is supposed to insert the the data and send results to the browser). See the two files below:
criteria.htm
<html>
<body>
<form...
I have put the " where it should be as suggested. It does not give errors. I don't know why. It use to give errors but no more. Infact anything I put, does not send errors. I guess something is wrong somewhere. Is there a place to activate error messages? I have also put the code:
$results =...
Thanks Stefanwagner,
No error. 'eho $query' outputs the result of the data enter in the form as globus. However, this data is not inserted in the table. Another problem now is that when I changed the name to insert2.php, it does not recognise it but is still refering to insert.php, the old...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.