Jump to content
xisto Community

SzamanGN

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. That solution will solve your problems: SELECT `song`,`artist`,COUNT(`id_th`) AS `countedvotes` FROM `tophits` WHERE `closedate`="2011-01-03" GROUP BY `song`, `artist` ORDER BY `countedvotes` DESC It will show counted votes for the songs and artists. Even if you have more then one the same name for the song or artist, you will have the correct statistics (I have tested it).
  2. My recommendation is:Start to learn:- HTML - on the level of understanding HTML code;- CSS - simple solution (there is no need to learn full CSS for the beginners);- PHP - how to: use variables, connect to database, query database, read and process outpus from database, object programming;- MySQL - building the queries for the database (why MySQL - most popular database on the hostings).Instal your oun WWW server like WAPM.And follow the steps:1. After basic programing learning start to make your first version of your game (only one of the functionalities of your game).2. Improve you programming skills by analyzing the code.3. Start new (improved) version of your game (more functionalities).4. Go to point no 2.And remember practice makes master!
  3. I want to have different colors on my Web Page for daytime and nighttime. How to do it? I need two CSS files: day.css - styles for the daytime. /* Day. */body{color: black;background-color: yellow;} night.css - styles for the nighttime. /* Night. */body{color: white;background-color: black;} and small PHP code, to recognize the current hour to check the time. <?php//Step #1 - Set teh timezonedate_default_timezone_set ("America/Denver");//Step #2 - Get current hour (in 24 hours system).$currentHour=date('H',time());//Step #3 - Check the daytime.if ($currentHour > 21 AND $currentHour < 7) { //Night. echo 'night'; } else { //Day. echo 'day'; }?> Now, I integrate the PHP code with my HTML code in the index.php file. <html> <head> <link REL="Stylesheet" HREF="<?php//Step #1 - Set teh timezonedate_default_timezone_set ("America/Denver");//Step #2 - Get current hour (in 24 hours system).$currentHour=date('H',time());//Step #3 - Check the daytime.if ($currentHour > 21 AND $currentHour < 7) { //Night. echo 'night'; } else { //Day. echo 'day'; }?>.css" TYPE="text/css"> </head> <body> <h1>The colours of the text and background are depended of the time:<br>- night style from 10 PM to 06 AM;<br>- day style from 06 AM to 10 PM. </h1> </body></html> Finally visitors can enjoy my Web Page (they can be surprise when they visit my page).
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.