Newbie Spellweaver
- Joined
- Jun 18, 2016
- Messages
- 20
- Reaction score
- 1
well im working on something for the gamecp i have and hit a snag.
1stt query will run if day is say 2016-6-19
but if date is set to say 2016-07-01 the 2nd one wont run to add to the EndDate for premium.
trying to make it so that if dont have premium it will GETDATE() then add w.e is set to
else it uses the EndDate and adds to current premium
1stt query will run if day is say 2016-6-19
but if date is set to say 2016-07-01 the 2nd one wont run to add to the EndDate for premium.
trying to make it so that if dont have premium it will GETDATE() then add w.e is set to
else it uses the EndDate and adds to current premium
if (!empty($account)){
connectuser2db();
if ($src_type == $src_cdn_account){
$query = mssql_query("select * from tbl_RFTestAccount where id = '$account'");
connectuserdb();
$query = mssql_query("select * from tbl_personal_billing where EndDate < dateadd(DAY,-1, GETDATE()) UPDATE tbl_personal_billing SET EndDate = GETDATE() + $amount WHERE ID = CONVERT(BINARY(13),'$account')");
}
ELSE
mssql_query("select * from tbl_personal_billing WHERE EndDate < dateadd(DAY, +1, GETDATE()) UPDATE tbl_personal_billing SET EndDate = EndDate + $amount WHERE ID ='$account'");
connectuser2db();
if ($src_type == $src_cdn_account){
$query = mssql_query("select * from tbl_RFTestAccount where id = '$account'");
connectuserdb();
$query = mssql_query("select * from tbl_personal_billing where EndDate < dateadd(DAY,-1, GETDATE()) UPDATE tbl_personal_billing SET EndDate = GETDATE() + $amount WHERE ID = CONVERT(BINARY(13),'$account')");
}
ELSE
mssql_query("select * from tbl_personal_billing WHERE EndDate < dateadd(DAY, +1, GETDATE()) UPDATE tbl_personal_billing SET EndDate = EndDate + $amount WHERE ID ='$account'");