Search the Community
Showing results for tags 'interval'.
-
Hello everyone, I have joined this forum just now hoping to find some help for my problem. I have a mysql query in my php file which i output to an array of html divs. The code is as follows: $result = mysql_query("SELECT * FROM numserved WHERE status = 'on'") or die(mysql_error()); while($row = mysql_fetch_array($result)) { ?> <div style="font-size:<?php echo $fontsize; ?>pt;" valign="middle" class="numberz" align="center" > <?php echo $row['number']; ?></div><?php } ?> I wanted to know if anyone could help me write the code to make this query be updated every 3 seconds without reloading the whole page. I know it is done by Ajax and tried to implement the Jquery solution , but I wasnt able to apply it. Anyone would be so kind to tell me the exact code i need and where to place it? Thank you
-
I have 4 links that I want to show a different one every 24 hours, I would just put the links in an array and chose a random one, but it needs to be a different one every day. I'm having trouble thinking of how to do this without a mysql db
-
For some reason, this isn't working as I'd expect. The current value I'm trying to change starts as: 2013-02-13 16:30:00 I then use this query: SELECT DATE_ADD(`end`, INTERVAL 30 MINUTE) FROM `my_table` WHERE `ID` = 3 And the result becomes: 2013-02-13 17:30:00 Now if I didn't know any better, it looks like 60 minutes was added, not 30. When I then try using INTERVAL 2 HOUR, the result comes out as: 2013-02-13 19:00:00 It also seems to me that the result is 1.5 hours later, not two. What am I not getting about this??