Created
May 22, 2014 04:19
-
-
Save Nasawa/6ba72988b3d13899424d to your computer and use it in GitHub Desktop.
gs sql query example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'master.php'; //sets obfuscated variables and connections | |
$userid = $_GET["userid"]; | |
mysqli_query("SET SESSION time_zone = '+00:00'"); | |
$query = "SELECT $dbuserid, $dbcell, ($dbduration - (time_to_sec(CURTIME()) - time_to_sec($dbstart))) as seconds, $dbcount, $dbactive FROM $dbusertable WHERE $dbactive = 0 AND $dbverified = 1 AND $dbclient = 1 AND CURTIME() > $dbstart AND (time_to_sec(CURTIME()) - duration) < time_to_sec($dbstart)"; | |
$result = $db->query($query); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment