3 ms·
Ah, speaking of code snippet of the day. Found someone’s code trying to check if a promo-code is already used, and if not to apply it: $codes = $db->exec(‘
by samsonradu 7y ago
Ah, speaking of code snippet of the day. Found someone’s code trying to check if a promo-code is already used, and if not to apply it:
$codes = $db->exec(‘SELECT code from promocode’);
if (!in_array($myCode, $codes)){
// use it
}
- cwmoore 7y ago!!