L
L
LordPrimes2018-02-18 15:41:59
MySQL
LordPrimes, 2018-02-18 15:41:59

Sampling by id from the database?

Good afternoon. Such a problem when I go to the page to view the section, all the information that I set from the database is displayed, and I need to display information that belongs to this id.
$id = isset($_GET['id']) ;
$query = "SELECT * FROM products WHERE products_id>='$id' ";
$result = $conn->query($query);
if (mysqli_num_rows($result) > 0 ){
$row = mysqli_fetch_array($result);
do {
}
echo '
Back to store '.$row["title"].'
'
;
}
while ( $row = mysqli_fetch_array($result));
}
?>
The one that the code displays all the information that is there, I understand this. I can’t understand how to put a restriction on it. Tell me how to fix it.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question