0
As I do to display a list of members of each post, being that some members are in more than one position. The categories where the members are, are in the same column separated by pipe (|
).
My code only displays the first id
(8) for example, in case I click on another post, as for example on id
40, he’s not on the website.
Just follow my code:
<?php
$id = isset($_GET['id']) ? $_GET['id'] : '';
$newid = ($id."|");
$sql = mysql_query("SELECT * FROM acp_usuarios u, acp_cargos t WHERE t.id=u.cargos AND u.id=t.user_id AND u.status='Ativo' AND u.ativado='s' AND u.cargos LIKE '$newid' OR u.cargos = '$newid' ORDER BY u.id");
while($ver = mysql_fetch_array($sql)){
?>