help with my block design
Posted: Thu Mar 03, 2005 2:39 am
hi, i am trying to get some blocks on the left hand side of my site, basically i want to be able to add a link in the sql which the db reads and then includes that file
what is happening is that it only shows the 1st result in database which is inblock side=1. the loop doesnt work.
ive tried loads of ways to do this and im at a loss, if someone can help me it would be greatly appreciated.
the structure is like this...
my main page incudes the blocks.php page, the blocks page consists of the above code and opens the link to the block.
thank you
phase
Code: Select all
$result = mysql_query("SELECT * FROM blocks WHERE block_side=1 ORDER BY block_priority");
while ($myrow = mysql_fetch_array($result)) {
include $myrowї"block_file"];
}
echo "</table>";ive tried loads of ways to do this and im at a loss, if someone can help me it would be greatly appreciated.
the structure is like this...
my main page incudes the blocks.php page, the blocks page consists of the above code and opens the link to the block.
thank you
phase