nicksalad
06-15-2007, 04:11 PM
Hello, here's the link of the script: http://www.dynamicdrive.com/dynamicindex2/cmarquee.htm
i modded it to show mssql values (table), the problem is, it shows only the first row, is there a way to display all the rows contained on that table (10)?
my mod atm is smth like this:
//Before javascript starts.
$mess1 = mssql_query("SELECT TOP 10 idname, name, message FROM mmessages ORDER BY idname DESC");
$fetch_mess1 = mssql_fetch_row($mess1);
then, inside javascript i added a var
var m1=\"<span class=style3>\"+\"$fetch_mess1[1]\"+\"</span>: \"+\"$fetch_mess1[2]\"
and then i changed here:
var marqueecontent='<nobr><font face=\"Arial\">'+m1+'</font></nobr>'
This mod shows me the name and message from that user, but the problem is it only shows one row from the table, on this case the last one (ORDER DESC).
Anyone knows how to show all the rows form the table? if there's 10 rows, show 10 messages, if there's 25 rows, show 25 messages...
Thanks you!
i modded it to show mssql values (table), the problem is, it shows only the first row, is there a way to display all the rows contained on that table (10)?
my mod atm is smth like this:
//Before javascript starts.
$mess1 = mssql_query("SELECT TOP 10 idname, name, message FROM mmessages ORDER BY idname DESC");
$fetch_mess1 = mssql_fetch_row($mess1);
then, inside javascript i added a var
var m1=\"<span class=style3>\"+\"$fetch_mess1[1]\"+\"</span>: \"+\"$fetch_mess1[2]\"
and then i changed here:
var marqueecontent='<nobr><font face=\"Arial\">'+m1+'</font></nobr>'
This mod shows me the name and message from that user, but the problem is it only shows one row from the table, on this case the last one (ORDER DESC).
Anyone knows how to show all the rows form the table? if there's 10 rows, show 10 messages, if there's 25 rows, show 25 messages...
Thanks you!