On 22-May-01 Adrian D'Costa wrote:
<snip>
>
> Thanks. Now I am into another problem. I am not sure whether it is php
> or mysql. Though it works in the command prompt of mysql. Below is the
> snippet of my php script. What I am trying to do is to randomly display a
> scroll from the special table. This happens when the page is loaded or
> refreshed.
>
> // sql statement
> $searchStmt = "select special.contid, special.cityid, special.curr1,
> special.catalogo, special.hf, special.curr2, special.vitofferta,
> special.fh, special.club,
> special.stars, city.city,RAND as r from special,city where
> DATE_SUB(special.periodo, INTERVAL 3 DAY) >'$tdate' and
> city.id=special.cityid order by r limit 1" ;
>
> var timerID=null
> var run=false
> count = 10 // counter of cycles
> ScrollSpeed = 800; // milliseconds between scrolls
> ScrollChars = 1; // chars scrolled per time period
>
> function Stop()
> {
> if(run) clearTimeout(timerID)
> run=false
> }
>
> function Start()
> {
> Stop();
> Marquee()
> }
>
> function Marquee()
> {
> var msg = document.forms[0].message.value;
> var tmp = msg.substring(0,ScrollChars);
> msg = msg.substring(ScrollChars) + tmp;
> document.forms[0].message.value = msg;
>
> if(count<200)
> {
> timerID = setTimeout('Marquee()',ScrollSpeed);
> run= true;
> count++;
> }
> }
> <!-- end -->
> </script>
> <form>
>
> <?php
> while($row = mysql_fetch_object($result))
Do you plan on executing a mysql_query() some time before this ?
<snip>
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php