Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About JayDz

  • Rank
  1. Nvm bro it worked perfectly, did something wrong myself. Thanks man, so awesome! <3
  2. Maybe it works if it countsdown right now gets a little change, like this: 24(hours) - current countdown time = the right countdown? So 24 hours minus the now final countdown time, this would make it work i think
  3. Thanks man, appreciate it. I wanted usern, passwd, id, auth to be checked for duplicated so I added auth: DELETE logs FROM logs INNER JOIN ( SELECT number , @seq := IF(CONCAT(usern, passwd, id, auth)<>@prevvals, 1, @seq+1) as seq , @prevvals := CONCAT(usern, passwd, id, auth) as prev FROM logs JOIN (SELECT @prevvals:=null, @seq:=0) as init ORDER BY usern, passwd, id, auth, date DESC ) as count USING (number) WHERE seq > 1; Although it gave the error: #1054 - Unknown column 'number' in 'field list' Number field looks like this:
  4. I made this thread hoping someone of you knew what sql query to use, im not requesting to change the management of all my sites. Im not going to change logins/systems, just looking for a query, and btw, my primary key is number
  5. Heres the script running: https://aio-store.com/timers/ It now says 15:07 hours till its 0:00 but this isn't true its 15:10 right now which means its 8:50 left till its 24:00/0:00 not 15:07 as what the timer is saying..
  6. I got too many log points so I cannot be asked changing all of them, thats why I want this script to delete duplicates. So I only want to delete the fields where the usern, passwd, auth, id is the same. This way everytime a user logs in on one of our sites theres a log to our database which is what we want.
  7. Hey man, sorry but this is only for one column? I want it to delete every duplicate (not date, active, number) so if the usern, passwd, matches but the auth doesn't match it should just be deleted
  8. This is not what i mean, it now counts down from the UTC+2 time, I need it to countdown till its 0:00 UTC +2 so when its 11:30 here it shouldnt countdown from 11:30 but it should say: 12:30 and countdown from this, because its 12:30 hours till its 0:00
  9. ​Do you know the query how I could do this? Im bad at SQL :s I'm not looking to replace the current logging system, just a delete function sorry.
  10. Hello Everyone! I would like to have a sql query which deletes all duplicate fields. So when a user logs in to our site it sends a log to our database, I want to delete duplicates with a cron-job. I dont know much about SQL or PDO so maybe some of you know the query to delete duplicates? Heres what the it looks like (name = logs):
  11. No I mean like, it now says: 19:25 and it counts down from UTC+2 time, what I want it to be is: 4:35 and it counts down to 0 and then it starts again from 24:00 Because everyday at 0:00 a cron job gets executed so thats why it should say 4:35 now and countdown to 0 so it says 0:00 when its 0:00 You get what I mean? (ps. thanks for the time ur spending on this <3)
  12. This works bro but its still not a countdown for me, it just says the time, it should say: 24:00 23:59 23:58 But it now says: 24:00 0:01 0:02
  13. It still doesn't seem to work man, demo: https://aio-store.com/timer.php (check page source) And ur fiddle shows just the time, not a countdown
  14. Somehow it doesnt seem to work for me (i need utc +2 time, not normal utc time btw) Demo: http://jaydz.eu/test.php <html> <head> <script type="text/javascript"> function countdown(startDate, el) { var hour = startDate.getUTCHours(); var min = startDate.getUTCMinutes(); var interval; var f = function(){ if (min == -1) { min = 59; hour--; } if (min < 10) { min = "0" + min; } var time = hour + ':' + min; el.innerHTML = time; if (hour == 0 && min == 00) { clearInterval(interval); } min--; }; f(); interval = setInterval(f, 60 * 1000); } countdown(new Date(), document.getElementById('timer')); </script> </head> <div id="timer"></div> </html>
  15. that doesnt seem to work, when i delete ur part is completely stops working. with this script it shows different countdown time, not all the same.. setInterval(function () { function addZero(i) { if (i < 10) { i = "0" + i; } return i; } var d = new Date(); var m = (d.getUTCMinutes()); var h = (d.getUTCHours()); var x = document.getElementById("timer") if (h >= 24) { h -= 24; } h = (23 - h); m = (59 - m); t = h + ":" + addZero(m); x.innerHTML = (t); }, 250);
  • 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.