0
If you refer to SQL, just use for example:
SELECT * FROM tabela_artistas WHERE id_artista <> id_artista_atual
0
5
If you refer to SQL, just use for example:
SELECT * FROM tabela_artistas WHERE id_artista <> id_artista_atual
3
You can do it in 2 ways:
Simple, filtering 1 record:
$query = 'SELECT * FROM tb_artistas WHERE id <> $id';
Example of the expected query result:
SELECT * FROM tb_artistas WHERE id <> 27
or if you bring more than 1 record, separating by comma:
$query = 'SELECT * FROM tb_artistas WHERE id NOT IN ($ids)';
Example of the expected query result:
SELECT * FROM tb_artistas WHERE id NOT IN (25,84,64,86)
Filtering multiple records, for a more formulated search (for example, with TAG):
$query = 'SELECT * FROM tb_artistas WHERE id <> $id AND tag IN (tags)';
Example of the expected query result:
SELECT * FROM tb_artistas WHERE id <> $id AND tag IN (2,5,8,10)
Browser other questions tagged php html mysql mysqli
You are not signed in. Login or sign up in order to post.
Edit the post with the code to explain the doubt better please.
– White