Ok back to:
$test="SELECT body FROM post WHERE topic = '$topic'";
$test2=mysql_query($test);
$row = mysql_fetch_array($test2)
echo implde(',', $test2);
//or you can use
echo $test2['columnName'];
I have this:
$db = mysql_connect("localhost", "Admin");
mysql_select_db("testy", $db);
$post = "SELECT username,topic FROM post";
$post2 = mysql_query($post);
$num=mysql_numrows($post2);
$i=0;
while ($i<$num)
{
$username="SELECT username FROM post WHERE id='$i'";
$username2=mysql_query($username);
$username3=mysql_fetch_array($username2);
echo $username3['username'];
$i=$i+1;
}
It doesnt give an error but it doesnt output anything either. I know there is something in the table tho. I am thinking it might be the $username="SELECT username FROM post WHERE id='$i'"; but not sure. I have tried diff combinatin but no success.