Answer the question
In order to leave comments, you need to log in
How to match by Id in psql?
there is a query to the database and output, but for some reason it does not work by id search only by 1 and not by all, I tried to change id to i or [i] also changed to pg_fetch_assoc and pg_fetch_array but nothing helps
$query = 'SELECT name FROM database';
$result = pg_query($query);
$myrow = pg_fetch_assoc($result);
$value = $myrow[name];
if ($value == "$word") {
$query2 = 'SELECT path FROM documents';
$result2 = pg_query($query2);
$myrow2 = pg_fetch_assoc($result2);
$value2 = $myrow2[path];
echo "$value2";
} elseif ($value <> $word) {
echo "нераспознало или нету в базе данных";
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question