I am so confused... if anyone could help me out i would really appreciate...
This is my database query (A), I need all the post id's thats joined to my threadsid meaning for example threadid nr 1 has say 4 post ids of values 4, 9, 8, 3 I get it out using this simple script;
$posts = $DB_site->query("SELECT postid FROM vb3_post WHERE threadid = $attach");
while ($row = mysql_fetch_array($posts))
{
$postid = $row['postid'];
}
Now I need to use all the postid's I gathered and do exacly the above query to get all my attachmentid's this would be for example postid 4 has 7 attachmentid's of values 1,2,3,4,5,6,7,8,9
(😎
$attachments = $DB_site->query("SELECT attachmentid FROM vb3_attachment WHERE postid = 172");
while ($row = mysql_fetch_array($attachments))
{
$attachmentid = $row['attachmentid'];
now how can I make this all a automated process to list all my attacmentid's from all my postid's considering I first have to get the postid's through the threadid's.
I hope I wasnt to confusing, its just something I dont understand and help would be so much appreciated...