Hi everyone,
I want to make a search using PHP in a database, and the point is that I only want to take the name of a game, but not the games that contain that word. The code I have:
$statement = $conexion->prepare("SELECT * FROM listado_precios WHERE pertenece LIKE \"%$pertenece_juego%\"");
$statement->execute();
$pertenece = $statement->fetchAll();
This code gives me mostly good results, but when the word is containing in another game (in my case), I receive also another game that I don´t want.
For example if I want to call a game called “Bastion” from the database, the returning games are “Bastion” and “Hope’s Bastion Pack”, when I only want to receive “Bastion”.
Is there a way to deal with this?
Thanks in advice!