viewing paste sql | Text

Posted on the
1 2 3 4 5 6 7 8
    if(query_sql("SELECT `claim` FROM `reward_logs` WHERE `code` = '" + escape_sql([email protected]$) + "'",[email protected])) { 
        set [email protected],1;      
        query_sql("UPDATE `reward_logs` SET `claim` = '"+1+"' WHERE `code` = '" + escape_sql([email protected]$) + "'" );
        query_sql("UPDATE `reward_logs` SET `last_ip` = '"+getcharip(strcharinfo(0))+"' WHERE `code` = '" + escape_sql([email protected]$) + "'" );
    }
    else {
        query_sql("INSERT INTO `reward_logs` (`char_id`,`last_ip`,`code`,`redeem_time`,`claim`) VALUES ('"+getcharid(strcharinfo(0))+"','"+getcharip(strcharinfo(0))+"','"+escape_sql([email protected]$)+"',NOW(),'"+1+"')");
        }
Viewed 258 times, submitted by Guest.