The following, when run, gives the error (Warning: pg_query(): Query failed: ERROR: column "server" of relation "pdf" does not exist in some_path/my_page.php on line 48) Line 48 is double-starred in the code:
<?php
...
$db = pg_connect("host=***** port=5432 dbname=***** user=**** password='*****'") or die("Unable to connect to the database.");
// see if the code exists
$check = pg_query("select * from pdf where code='$code'");
if (!(pg_num_rows($check))){
?>
<H2>Error</H2>
<br>
No entry with such code exists.
<?php
exit;}
// modify 'pdf' table
$modentry = "UPDATE pdf SET $type = '$string' WHERE code = '$code'";
** $result = pg_query($modentry);
// do logging
define $log and do some stuff with it (this part is working);
$log_result = pg_query($log);
?>
now the code does the logging on the server, but doesn't apply the actual modification.
i have absolutely no idea why it is doing this. it's been a roadblock for my development for so long...
thnx if u help