Answer the question
In order to leave comments, you need to log in
How to display more than one value with the same identifier from the database?
with this query I output
$query="select `id_photo` from `reiting` where `id_user`=".$_SESSION['user']."";
but in the table 2 id_user and accordingly I need to display 2 id_photo but how?
Answer the question
In order to leave comments, you need to log in
It is completely unclear what the problem is (given that the request is written correctly). Or a problem in PHP-implementation? :) You can do, for example, like this:
$query="select `id_photo` from `reiting` where `id_user`={$_SESSION['user']}";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_assoc($result))
{
echo "{$row['id_photo']}.<br/>";
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question