When I Try to built Query from another Query in php code I Faced some problem
can you tell me why? :(
code :
$First="SELECT ro.RoomID,
ro.RoomName,
ro.RoomLogo,
jr.RoomID,
jr.MemberID,
ro.RoomDescription
FROM joinroom jr,rooms ro
where (ro.RoomID = jr.RoomID)
AND jr.MemberID = '1' ";
$sql1 = mysql_query($First);
$constract .= "ro.RoomName LIKE '%$search_each%'";
$constract="SELECT * FROM $sql1 WHERE $constract ";// This statment is Make error
thanks ,Query it is Work now ! ..
But I Faced another problem ,When I Display the Result of this Query ..
code :
$run =mysql_query ($sql);
while($runrows=mysql_fetch_assoc($run))
{
$RoomName=$runrows["ro.RoomName"];
$RoomDescription=$runrows["ro.RoomDescription"];
echo "<center><b>$RoomName</b><br>$RoomDescription<br></center>";
}