I found the solution.
The result 1 for my query means true and it’s a boolean so
$wpdb->query can return true, not only int|false as it is written above the public function query : wpdb::query
PHP code
$res = $wpdb->query("ALTER TABLE " . $table_name. " ADD " . $column_name . " varchar(35)");
error_log( $res );
error_log( "bool ? : " . ( is_int( $res ) ? 'true' : 'false' ) );'false' ) );
output
1 [18-Dec-2017 17:10:10 UTC] 1
2 [18-Dec-2017 17:10:10 UTC] bool ? : true
Related Posts:
- Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?
- Should I use Transients with W3 Total Cache APC Caching? [closed]
- Add indexing to meta_value in wp_postmeta
- Get posts by menu ID
- Slow SQL_CALC_FOUND_ROWS Query
- What is an efficient way to query based on post_meta?
- WP_Query Performance Issues with meta_query
- Should close $wpdb via $wpdb->close()
- Get the post permalink within the loop but without additional DB query
- Filter WordPress posts by between parameter
- Retrieve featured image (thumbnail) url from multiple posts with one query
- How To Get Some Data From WordPress Database Using WordPress $wpdb Query?
- What’s faster? One big query, or several smaller ones?
- How WordPress attaches its Featured Images with posts?
- Order by custom table and multiplication
- why update and delete query not worked in custom table?
- How to implement a new row_count method in WordPress?
- querying data via $wpdb and get_row
- wp_Qwery works to slow
- Show all data in database table and make it into an interactive table
- No results found from a $wpdb->get_results() query when trying to join more than one meta key query
- database query with more than a couple meta hangs and doesn’t complete
- How to access custom WordPress database tables
- Is it possible to query from external database? [duplicate]
- WP User Query with Custom Fields and Search Results
- List of ways to access WordPress database?
- Specify strict ‘order by’ in WordPress query
- How to set up hierarchical relationships without using plugins / meta query
- how to get Nearby zipcode
- Does WordPress have something like Drupal’s DB API?
- Using Transients
- Slow Query On Search
- how to write wordpress query for multiple metakeys checking?
- Why having more than 10 clauses in WP_Query results in some outputs being dropped?
- Storing an array of objects related to each user
- Retrieve data from wordpress db via input and put those result in dropdown
- WP Query – filtering terms with regex
- WP_Query with page_ids in arguments without a result
- Function to retrieve IDs of posts, cache results, and improve wp_query
- Issue with data array format
- Why last row deleted when refresh page
- Query a database based on form input then output to another page [closed]
- wp query search multi terms
- How to get meta key list efficiently?
- How to get user avatar via WPDB
- How to extend WP_query to a specific table?
- Fix wp_term_relationships slow query in get_posts
- Translating WP query into to SQL query
- update_post_meta performance in a loop woocommerce
- update_post_meta performance in a loop woocommerce
- WP_Term_Query->get_terms() very slow query for WordPress filter
- Separate by Category Post Type
- I removed the “wp_rm_logs” table and am constantly getting this error
- Track write actions to the database
- Include post_status check within $wpdb query
- wpdb get_results() returns only 2 rows
- Website goes slow down after importing long database
- WP_Query always returning the last custom post
- option select form always deleting the sql query
- Optimising amount of calls to custom fields
- 294 Queries on Mainpage of WordPress
- how to add limit records in wordpress query
- Custom WP_query in Jnews theme returns thousands of posts
- WP_Query by meta key not returning any posts
- SQL query into to WP query
- Return parent post with its children using WP_Query?
- How does reset_postdata restore the post of the main query loop?
- WordPress Custom Query to show posts from last x years
- Pagination with 5 posts per page
- Is there an action/filter called when WP_Query->query is finished and assigns posts
- get images attached to post
- How to support multiple search terms query within one process?
- Order by the results of a function with WP_query
- Pagination not working for category posts
- How to use WP_Query to filter posts modified after a specific date
- tax_query shows no results if nothing is selected
- meta_key and meta_value not working together
- Select random post every day
- Include Sticky Posts with Custom Query
- Order WP Query posts by custom order calculated from post meta values
- How to query for custom field within Gutenberg block from outside of that post? [closed]
- WP_Query mixe post and page attributes
- get_query_var returns null
- post thumbnail not showing up with shortcode
- Wp query orderby ‘title’ doesn’t work
- Meta query with JSON value
- Prevent duplicate post from dynamic multiple loops
- Get meta info related to current post
- Can I count matches without doing a query?
- Store sticky post’s ids in a transient
- How to detect if query is runned from widget?
- Using meta_query with multiple keys and compare values
- Woocommerce query all products and categories
- Add “Category” to Mysql Query
- Can I set my WP_Query to be a Main Query?
- Sort wordpress custom posts based on meta value
- How to use external API content in place of WP posts using $wp_query?
- Is it possible to set specific posts to show first in a query?
- How to make search for posts using get method?
- wp_query args adding muitiple tax_querys