Jump to content

RajkumarLA

New Members
  • Posts

    4
  • Joined

  • Last visited

RajkumarLA's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Added animated twitter bird widget code on site.. the bird appears on the site.. but when the bird moves the animation seems out of sink, not smooth.. Have a look at the site. you'll notice the problem when the bird moving... http://www.r7alh.com/ the same code working fine on my localhost. <!-- Twitter Bird Widget for Blogger by Way2blogging.org --> <script type="text/javascript" src="http://widgets.way2blogging.org/blogger-widgets/w2b-tripleflap.js"> </script> <script type="text/javascript"> var twitterAccount = "way2blogging"; var tweetThisText = " <data:blog.pageTitle/> : <data:blog.url/> "; tripleflapInit(); </script> <span style="font-size:11px;position:absolute;"><a title='Blogger Widget by Way2blogging.Org' href="http://www.way2blogging.org" target='_blank'>Blogger Widgets</a></span> <!-- Twitter Bird Widget for Blogger by Way2blogging.org --> The same code working fine on blogs and other websites. only problem is in this site.. http://www.r7alh.com/ what will be the problem? how to fix this? http://www.way2blogging.org/2011/04/add-animated-flying-twitter-bird-widget.html
  2. Barand no. there is only today's date in the database. all other rows doesn't have date. when the first row displayed i will insert the 2nd rows date as 'tomorrows' date. so next day the 2nd row will be displayed and 3rd row's date is updated to next day's date. the above code is working fine. the problem is that update query runs every time the page loads. i want to run the update query only once in a day....
  3. Table: cquestions -> cqid, cqtext, showdate. I want to update 'showdate' field to tomorrows date.. cqid cqtext showdate 200 q1 2013-05-22 201 q2 0000-00-00 202 q3 0000-00-00 the idea is to display only one question everyday. showdate is compared with the current date and display the first question q1. the starting date only store in db. now i want to update only the next row (q2)'s showdate to tomorrows date. next day wen q2 is displayed q3 will be updated to tomorrows date. today q1 displayed. db is like this. cqid cqtext showdate 200 q1 2013-05-22 201 q2 2013-05-23 202 q3 0000-00-00 tomorrow q2 displayed. then db cqid cqtext showdate 200 q1 2013-05-22 201 q2 2013-05-23 202 q3 2013-05-24 203 q4 0000-00-00 my code: $today=date("Y/m/d"); $tomorrow= date("Y-m-d", strtotime("tomorrow")); echo "<form method='post' id='submit' action='checkresult.php'>"; $sql="SELECT * FROM cquestions where showdate= '$today' limit 1"; $result=mysql_query($sql); while ($row = mysql_fetch_array($result)) { $cqid=mysql_result($result,"cqid"); $update1="update cquestions set showdate='$tomorrow' where showdate='0000-00-00' and cqid!='$cqid' order by cqid limit 1"; mysql_query($update1); echo "<p>" . $row['cqtext'] . "</p>"; $sql2="SELECT * FROM canswers where cqid=".$row['cqid']; $result2=mysql_query($sql2); while($row2=mysql_fetch_assoc($result2)){ echo "<input type='radio' name='".$row['cqid']."' value='".$row2['cqans']."' />".$row2['aatext']; } /*echo "<input type='hidden' name='email' value='email' />";*/ } echo"<input type='submit' id='submit' name='submit' value='Submit Answers' />"; echo "</form>"; ?> this code update the next row, but the problem is its executed every time page loads and update the next row... i want to execute the update query only once for the day. how to do it?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.