As I'm not familiar with MS SQL syntax, I can only talk in generalities here. As far as the marquee script is concerned, what you want to do is dynamically write out the variable "marqueecontent" so it's set with the contents to show. In PHP, it looks something like this:
Code:
<?
$data= mysql_query($query);
$output="";
while($d=mysql_fetch_array($data)){
$output.=$d;
}
echo "var marqueecontent='<nobr><font face=\"Arial\">" . addslashes($output) . "</font></nobr>'";
?>
This results in something like the following displayed when you view the browser source:
Code:
var marqueecontent='<nobr><font face="Arial">Thank you for visiting <a href="http://www.dynamicdrive.com">Dynamic Drive.</a> If you find this script useful, please consider linking to us by <a href="../link.htm">click here.</a> Enjoy your stay!</font></nobr>'
In other words, your goal is simply to get the server to output the JS variable "marqueecontent" exactly as it appears inside the script and set with the contents to show. Just looking at your SQL syntax, it doesn't seem you have the correct syntax to retrieving all of the rows' data and appending it to a single variable.
Bookmarks