You could use the MONTHNAME(dato)
on your select Like
$rows = $wpdb->get_results( "SELECT MONTHNAME(dato) as month_name, avg(fiske_vaegt) as fiske_vaegt
FROM `wp_registreringer`
WHERE MONTH(dato) = 11 AND YEAR(dato) = 2017;");
and access it like this echo $row->month_name
Related Posts:
- How to Generate a list of Most Commented post?
- How to return number of found rows from SELECT query
- $wpdb->delete column values IN ARRAY()?
- WPDB: how to get the value of a field in a custom database table
- $wpdb->flush(); breaks the loop
- Any possible way to make $wpdb->get_results() return anything else than array?
- database interactions using OOP
- Trying to establish connection to External Database
- Getting id of poll from WP database
- How to insert a single row to WP database table?
- $wpdb->update with multiple parameters gives error
- Update results, Before deleting the related category [closed]
- How WordPress reacts to a lack of memory of the server [closed]
- How to retrieve the data from the sever and displaying it in a page?
- I can’t update my data through $wpdb
- wpdb Cannot Update column in Database
- Delete database record using plugin from admin panel
- WPDB – Read and write value from / to database
- Add row to custom database Table and delete all rows older than 1 day
- select a single val though a table in wordpress
- Add posts to custom table in database instead of wp_posts
- Using wpdb to connect to a different database is not working
- How to grab data from input and store it into custom table in database?
- Accessing external database: ERR_INCOMPLETE_CHUNKED_ENCODING
- How to fetch results from database
- Querying multiple meta_keys in WordPress SQL query
- MySQL database migration to WordPress
- Fetching wpdb data from a php file seems to break?
- Insert into db with foreach problem
- How to get data (not value or name) from radio options to POST to database
- Putting form result in my database
- How to export/import theme customizer settings?
- WP API V2 returning Invalid User ID
- Print out WordPress user ID – two sites with same code but different output
- Store loop into array
- Looping through WP_Post Object
- Access/update database with jQuery
- Show Custom Taxonomy Title
- How to exclude specific category from the get_the_category(); array
- spliting posts into two columns
- Add custom php database code above
- How to Display a Single Post Excerpt
- Show MySQL errors that occur when I excute $wpdb->insert()
- how to delete 30 day old data using PHP [closed]
- Echo a hierarchical list of post data from custom fields
- Changing layout with wp_customise
- WordPress not reflecting changed of the database
- Querying wpdb using PHP
- wpdb php get_var query to get ID for URL image doesn’t work for ID over 999
- Database query works fine outside WordPress
- How Can I use WP_Query to Only Display 1 Post from Custom Post Type if Query Returns Posts with Matching ID in Custom Field
- Help with a $wpdb MySQL Query
- db converts decimal number wrong
- I’m trying to create an array with a foreach loop, but the array only stores the last item [closed]
- $wpdb returns duplicate posts
- Creating Database Table vs. Adding MetaData to Post & User
- Cant connect to database with php 7.3
- Problem with custom loop and wp_list_pluck [closed]
- Display child page content of a specific parent on home page
- Creating custom page template from existing PHP site
- wordpress site – using custom database and PHP
- How to use AJAX in WordPress in MYSQL query?
- How to wrap every 3 posts in a div (and close the last div too) [closed]
- Dividing the loop to style post differently
- WordPress loop is not working
- Fetching review value using wpdb class
- Problem in replacing the_content with the_excerpt()
- Search AJAX Filters – Multiple Query Loops Into One Loop (Optimization)
- MySQL Query Returns Array () In Shortcode
- Passing in MySQL prepare statement parameter separately throwing error
- Database SQL query error
- Change wordpress’ database data using ajax – how to get current user id?
- Pagination contents not changing in Front page WordPress
- MYSQL TIMESTAMP when adding DATE_FORMAT then the output is blank, PHP conflict?
- Display all categories including sub categories under a list ul
- Retrieving and Displaying Data From a Table
- Where does php code to load data go?
- Adding new divs with custom classes to products on WooCommerce shop page [closed]
- Can I disable auto increment of WordPress Posts Database to utilize previously deleted records?
- Latest posts feed with a specific post always first
- Updating the database after parsing CSV document
- problem in using wpdb->prepare and a string placeholder
- How fix error in the WordPress loop?
- Advanced WordPress SQL Query
- Efficient way of querying for a “fallback” post?
- Issue in url update when using wordpress update query
- Loop 1 user randomly
- Create a hierarchical loop at predefined markup requirements
- MySQL query in WordPress with AJAX
- enumerating custom taxonomies?
- Order by in foreach
- How to display thumbnail if post is assigned one otherwise not
- Pagenav Not appearing on custom Template
- Adding if statement to content for homepage
- Tables not showing divs and loop/php items
- Pagination in category.php not functioning
- How to handle parent and child pages?
- How to create a loop that will display one post and stop?
- save array of objects with update_option
- WordPress / PHP: Check if column has value and then check if value in array