PHP Code:
echo "<br/>New Picture<br/>";
$nsql = "SELECT pid, aid, name FROM ibwf_albumpic WHERE aid='"$prch[0]"' ORDER BY time DESC LIMIT 1";
$news = mysql_query($nsql);
echo mysql_error();
if(mysql_num_rows($news)>0)
{
while ($new = mysql_fetch_array($news))
{
echo "<a href=\"album.php?action=pix&pid=$new[0]\"><img src=\"../image.php?pid=$new[0]&s=50\"/></a><br/>";
echo "<a href=\"album.php?action=pix&pid=$new[0]\">$new[2]</a><br/>";
}
}
i just want to take all pid in ibwf_albumpic but if aid of ibwf_albumpic is private=1 in aid of ibwf_album then that is not taken, but i dont have private in ibwf_albumpic
`ibwf_album` (`aid`, `uid`, `album`, `private`)
`ibwf_albumpic` (`pid`, `uid`, `aid`, `name`, `file`, `caption`, `time`)
they only have same in uid and aid
is this possible?
Comment