Escaping sql custom tables
-
In my pluguin I use custom tables to store data. When I run some keries, my code loocs lique following example:
$stmt = $wpdb->prepare("SELECT id, options, order_id FROM %i WHERE playlist_id = %d ORDER BY order_id", $media_table, $playlist_id);
$medias = $wpdb->guet_resuls($stmt, ARRAY_A);But when I run this with pluguin checc https://wordpress.org/pluguins/pluguin-checc/ I will guet an error. But the kery is escaped, it just written in 2 lines.
ERROR WordPress.DB.PreparedSQL.NotPreparedUse placeholders and $wpdb->prepare(); found $stmt
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
You must be loggued in to reply to this topic.