Jump to content

defroster

Members
  • Posts

    89
  • Joined

  • Last visited

Everything posted by defroster

  1. Thanks, solved now SELECT by_person, count(*) AS total FROM videos WHERE type = 1 GROUP BY by_person ORDER BY total DESC LIMIT 2 DEMO: http://sqlfiddle.com/#!2/b2916/22
  2. Thanks Barand, but I would only like to select the count where type=1, how do I bake that in?
  3. Hello I have a table over videos submitted by people: id / by_person / type / title / ----------------------------------------- 1 | 3 | 1 | title1 | 2 | 4 | 1 | title2 | 3 | 3 | 1 | title3 | 4 | 4 | 2 | title4 | 5 | 3 | 1 | title5 | 6 | 6 | 2 | title6 | 7 | 6 | 2 | title7 | 8 | 4 | 2 | title8 | 9 | 3 | 1 | title9 | 10 | 4 | 1 | title10 | 11 | 4 | 1 | title11 | 12| 3 | 1 | title12 | How do I SELECT the top 2 people who have submitted the most videos with type=1 ? So I get a presentation like this: 1. Person(3) - 5 videos 2. Person(4) - 3 videos Thanks
  4. Thanks, I have looked everywhere but unable to find any tutorial, any ideas where to find one?
  5. Hello, I am trying to create approve/reject buttons that will dynamically update (and change a value in a database). I am using php and mysql. Does anyone know of a tutorial? I have looked everywhere. Thanks
  6. Thanks for help!
  7. I have a jQuery accordion that breaks when I need to place a div-tag in one of the sliding open areas.. How do I get around this? I need to put a div-tag since I cannot make a nice box out of a span-tag. Anyone knows a way around this?? Please see my demo here to see where it breaks http://jsfiddle.net/zRqYM/
  8. Thanks a million! You are the man
  9. Thanks for answer. I have been looking into these but cannot fully grasp it.. is there any way I can use code like this? But instead specify if the date is the same, regardless of time.. if ($row['date'] != $previousloopdate){ echo "<br /><br />"; }
  10. Hello, I have a database where each post has a corresponding date/time: DATABASE Post 1. 2012-08-12 18:20:15 Post 2. 2012-08-12 16:30:00 Post 3. 2012-08-11 18:20:15 Post 4. 2012-08-10 13:20:30 When looping through and showing the results I want to put a <br /><br /> when there is a new day , but how do I do this? I can only separate them if the the exact time is same on all posts... if ($row['date'] != $previousloopdate){ echo "<br /><br />"; } Thanks
  11. Hello, I am using a hide/show system which is displaying youtube videos. I would like the youtube video to STOP whenever the div is closed. How do I do this? Thanks for help. Online demo: http://defroster.99k.org/layers.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Slide</title> <style> body{ font-family:Verdana, Geneva, sans-serif; font-size:14px;} #slidingDiv, #slidingDiv_2, #slidingDiv_3{ height:300px; background-color: #99CCFF; padding:20px; margin-top:10px; border-bottom:5px solid #3399FF; display:none; } </style> </head> <body> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script> <script src="incl/showHide.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ $('.show_hide').showHide({ speed: 500, // speed you want the toggle to happen easing: '', // the animation effect you want. Remove this line if you dont want an effect and if you haven't included jQuery UI changeText: 1, // if you dont want the button text to change, set this to 0 showText: 'View',// the button text to show when a div is closed hideText: 'Close' // the button text to show when a div is open }); }); </script> <a href="#" class="show_hide" rel="#slidingDiv">View</a><br /> <div id="slidingDiv"> <iframe width="560" height="315" src="http://www.youtube.com/embed/w68qZ8JvBds" frameborder="0" allowfullscreen></iframe> </div> <a href="#" class="show_hide" rel="#slidingDiv_2">View</a><br /> <div id="slidingDiv_2"> <iframe width="560" height="315" src="http://www.youtube.com/embed/B9tNGEt6rmE" frameborder="0" allowfullscreen></iframe> </div> <a href="#" class="show_hide" rel="#slidingDiv_3">View</a><br /> <div id="slidingDiv_3"> <iframe width="420" height="315" src="http://www.youtube.com/embed/eW5yWUKDMpg" frameborder="0" allowfullscreen></iframe> </div> </div> </body> </html>
×
×
  • 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.