$str = pg_escape_string($ip);
$result2 = pg_query($dbconn, "SELECT * FROM table WHERE name = '{$str}'");
$myrow = pg_fetch_assoc($result, id);
$query = 'SELECT name FROM documents';
$result = pg_query($query);
$myrow = pg_fetch_assoc($result);
$value = $myrow[name];
echo "$value";
echo "$word";
if ($value == $word) {
echo 'dab';
} elseif ($value <> $word) {
echo "pozshral";
}
$sql = pg_query($dbconn, 'SELECT name FROM documents WHERE name == $file');
include ('file.php');
'SELECT preview_path FROM documents';
$result = pg_query($query);
if (!$result) {
echo "Problem with query " . $query . "<br/>";
echo pg_last_error();
exit();
}
$myrow = pg_fetch_assoc($result);
$value = $myrow[name];
$value2 = $myrow[source];