Hi,

I have the follow running on my local host rh 7.0

My version
+------------------+
| version()        |
+------------------+
| 3.23.22-beta-log |
+------------------+
php
4.0.1pl2

my virtual host
mysql
+-----------+
| version() |
+-----------+
| 3.22.32   |
+-----------+
php running on some version of php3.


The below script works fine with my local host.  Online it does not get
the next random record to display.  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.

What I think is that php3 has some problem or mysql.  Though I check the
select statement at the mysql prompt, it works.  What could be the
problem.

// 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))
{
?>
<input name=message size=57 value="<?php echo

        $row->city . ", " .
        "Catalogo Prezzo" . " " .
                $row->curr1 . " " .
                $row->catalogo . " " .
                $row->hf . ", " .
                "Vitofferta" . " " .
                $row->curr2 . " " .
                $row->vitofferta . " " .
                $row->fh; ?>  ">

<?php } ?>
  </form>

TIA

Adrian






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to