There is an array consisting of string data
let's say:
$arr[0]='hello'; $arr[1]='world';
It is required to output all records from the table of mysql database, a specific cell of which corresponds to one of the array elements:
mysql_query("SELECT title FROM $table WHERE value=*Одному из значений*$arr[]");
Further more difficult.
For cells in which value
is equal to the last element of the array, it is necessary to return not only the title
, but also, say, descrition
(one or more additional cells). In the example above, for all lines with value value='world'
it is required to return not only the title
, but also the description
.
Further more difficult.
Suppose each entry has its own unique id and parent value (id) to be able to access it. Is it possible to output only those records from the database in which not only the value value corresponds to the value of the array element, but also the value value of the parent corresponds to the value of the previous array element .
Is this even possible in mysql? Thank you in advance.