Is SQLi vuln in the code below? If the code doesn’t %s, that code can execute SQLi, but I don’t know if the below code is safe or not
$query= $wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->prefix}test_table WHERE test_id = %s", $test_id ));
I am writing this code for my project but I don’t know if this code is safe or not. Please help me.
Recognized by PHP Collective
New contributor
Peter is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.