Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $result = mysql_query("SELECT * FROM coupon WHERE Email_Address='$address'");
- if (mysql_num_rows($result)==0){
- echo "ADDING TO DATABASE: " . $address;
- if( FALSE === mysql_query("INSERT INTO coupon (Date_Issued, Email_Address, Coupon_Code, Coupon_Expiry) VALUES ('".date(Y-m-d)."', '$address', '$couponcode', LAST_DAY('".date(Y-m-d)."'))") ) echo mysql_error();
- }
- /// ERROR: Column 'Coupon_Expiry' cannot be null
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement