Hey guys so I am trying to insert some strings into my wordpress database, it proceeds but nothing is sent over, no values are stored for some reason.
Here is the code:
$wpdb->query( $wpdb->prepare(
"
INSERT INTO $wpdb->discount_info_guest
( firstname, lastname, email )
VALUES ( %s, %s, %s )
",
$firstname,
$lastname,
$email
) );
echo"working";
exit;
Let me know what you think, and if you need any other info.
Thanks!
Database:
Field Type Collation Attributes Null Default Extra
ID bigint(60) UNSIGNED No auto_increment
firstname varchar(60) utf8_general_ci No
email varchar(60) utf8_general_ci No
discount_code_used varchar(60) utf8_general_ci No
order_state varchar(10) utf8_general_ci No 1
Indexes:
Keyname Type Cardinality
PRIMARY PRIMARY 0
$wpdb->discount_info_guest should be {$wpdb->prefix}discount_info_guest