H
H
Hehereb2016-01-09 10:13:11
PHP
Hehereb, 2016-01-09 10:13:11

How to make Get-parameters a condition for fetching from a database?

Through get, several values ​​​​arrive, how to use them correctly as conditions for selecting from the database?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
X
xmoonlight, 2016-01-09
@xmoonlight

http://domain.com/?id=1,2,3,4&prop=5,6,7

foreach ($_GET as $key => $value)  {
//SELECT * FROM table WHERE $key IN ($value);
}

A
Alexey S., 2016-01-09
@Winsik

The enumeration of all values ​​in the get is done like this:
but how to insert it into your select is up to you =)))

N
nozzy, 2016-01-09
@nozzy

stackoverflow.com/questions/3939889/php-mysql-sele...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question