Question 1. I know I don't need to do them for wbdb->insert
or wbpdb->delete
, but people say do it anyway even though the class will do it for you.
// I've got a select count query function and should use it here.
global $wpdb;
$entries = $wpdb->prefix . 'simpledir_entries';
$count = $wpdb->get_var("SELECT COUNT(*) FROM $entries WHERE rel = $id;");
if($count <= 0){
return false;
}else{
return true;
}
Question 2. I'm not sure how to formulate this into the proper prepared statement which is completely secured. Does $entries and $id both need it?
Thanks