Question about direct database call warnings
-
This my code:
$albums = $wpdb->get_results( "SELECT id, name FROM $wpdb->wppa_albums", ARRAY_A );
It produces 2 warnings:
– Use of a direct database call is discouraged.
– Direct database call without caching detected. Consider using wp_cache_get() / wp_cache_set() or wp_cache_delete().What should i do with these messages? I have no idea how wp_cache_get() can be used here.
Note: My plugin wp-photo-album-plus creates and maintains various own db tables, like wppa_albums
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.