I have one table from MySQL and I want to select some rows from this table without having to use lots of queries to find single rows.
My code currently is something like that :
$query = "SELECT def_conteudo FROM conteudo WHERE nro_conteudo = '101' ";
$query2 = "SELECT def_conteudo FROM conteudo WHERE nro_conteudo = '102' ";
$query3= "SELECT def_conteudo FROM conteudo WHERE nro_conteudo = '103' ";
$query4 = "SELECT def_conteudo FROM conteudo WHERE nro_conteudo = '104' ";
And I don't like it, because for me it seems useless this code but I don't know a better way to find a solution to this, as I am new to PHP.
I want something like that if possible :
$query = "SELECT * FROM conteudo";
And while selecting all the table, I could choose what value I would display, without having multiple queries. How can I make that work ?