[Plugin: Limit Image Size] SQL-Statement is not flexibel / best way
-
Hi,
the SQL-statement:
$id = $wpdb->get_var(“SELECT ID FROM wp_posts WHERE guid LIKE ‘%”. $metadata[“file”] .”%’ LIMIT 1″);
in the function lis_adicionar_data($metadata) ist not the best way or not as flexibel as needed to get the ID for a post. The SQL-Statement only work in a standard installation where the table-prefix is “wp_”. In a lot of cases the table-prefix may be change or removed.
Since I didn’t know the correct wordpress API I can’t tell you a fix, but this maybe a hint for others.
Regards,
Dirkhttps://www.ads-software.com/extend/plugins/limit-image-size/
- The topic ‘[Plugin: Limit Image Size] SQL-Statement is not flexibel / best way’ is closed to new replies.