Title: Long sql code rows break the visual table
Last modified: January 8, 2021

---

# Long sql code rows break the visual table

 *  Resolved [Rookie](https://wordpress.org/support/users/alriksson/)
 * (@alriksson)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/long-sql-code-rows-break-the-visual-table/)
 * SQL code row styling issue.
 * Sometimes some extremely long queries from wp-options table break the visual 
   readable table. We need something like:
 *     ```
       #glbb-debug-bar code, #glbb-debug-bar pre {
           white-space: pre-wrap;
       }
       #glbb-debug-bar td, #glbb-debug-bar tr {
           flex-direction: column;
       }
       ```
   
 * Without this I have to scroll for a long time horizontally to find all other 
   SQL queries. It’s just optimal which can be fixed with some CSS when there are
   edge cases of very long queries.
    -  This topic was modified 5 years, 4 months ago by [Rookie](https://wordpress.org/support/users/alriksson/).

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/long-sql-code-rows-break-the-visual-table/#post-13882850)
 * Please post a screenshot
 *  Thread Starter [Rookie](https://wordpress.org/support/users/alriksson/)
 * (@alriksson)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/long-sql-code-rows-break-the-visual-table/#post-13882860)
 * [@geminilabs](https://wordpress.org/support/users/geminilabs/) [https://snipboard.io/ucxbyw.jpg](https://snipboard.io/ucxbyw.jpg)
    -  This reply was modified 5 years, 4 months ago by [Rookie](https://wordpress.org/support/users/alriksson/).
 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/long-sql-code-rows-break-the-visual-table/#post-13883100)
 * Using `white-space: pre;` instead of `white-space: pre-wrap;` was intentional
   I as personally prefer to see the SQL queries without a word-wrap. Instead, I
   opted to break the SQL query strings into new lines by SQL statement.
 * This edge case is an extreme one, and only occurs when performing an **UPDATE**
   query of a long serialised string value to the database. 99% of the time you 
   will not be doing this kind of SQL query on page load.
 * The SQL tab is meant to help you evaluate SQL query performance. If you are using
   it to inspect serialised values that you are saving to the database, a better
   way to do this is to use `apply_filters('console', $updateValue)`
 *  Thread Starter [Rookie](https://wordpress.org/support/users/alriksson/)
 * (@alriksson)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/long-sql-code-rows-break-the-visual-table/#post-13883123)
 * That’s great and I could vote for!
 * > This edge case is an extreme one, and only occurs when performing an UPDATE
   > query of a long serialised string value to the database. 99% of the time you
   > will not be doing this kind of SQL query on page load.
 * So you would say I have an issue I need to look into?
 * > The SQL tab is meant to help you evaluate SQL query performance. If you are
   > using it to inspect serialised values that you are saving to the database
 * Yes but hard to see everything at a glance without all scrolling just a minor
   styling update as I had this never ending horizontal scrolling bar, and it was
   just annoying.
 * > a better way to do this is to use apply_filters(‘console’, $updateValue)
 * What will this do?
 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/long-sql-code-rows-break-the-visual-table/#post-13883143)
 * Is this SQL query being run on each page load?
 * `UPDATE wp_options SET option_value = '...' WHERE options_name = 'fs_accounts`
 * If so, why?
    If not, when?
 * And why does the value being saved need to be evaluated?
 * If the value needs evaluating, a better way to do this is with `apply_filters('
   console', $value)` which will unserialise the value being updated and print it
   to the console tab.
 *  Thread Starter [Rookie](https://wordpress.org/support/users/alriksson/)
 * (@alriksson)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/long-sql-code-rows-break-the-visual-table/#post-13885424)
 * Seems to be used by “Freemius” Freemius, have two plugins using it as their SDK.
 * One will move to EDD soon so will apply this [https://github.com/Freemius/freemius-fixer](https://github.com/Freemius/freemius-fixer)
   once it’s done.
 * > If the value needs evaluating, a better way to do this is with apply_filters(‘
   > console’, $value) which will unserialise the value being updated and print 
   > it to the console tab.
 * Can you show me an example? Is it supposed to work as the profiler?
 * Why can’t the profiler show time + amount of SQL queries you profile. As the 
   general sql profile is showing everything. Would be useful. And also to see which
   queries are cached and not to better improve the calls. How do you check if a
   query is cached by wordpress or not?
 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/long-sql-code-rows-break-the-visual-table/#post-13886018)
 * > Can you show me an example? Is it supposed to work as the profiler?
 * This is explained in the [FAQ](https://wordpress.org/plugins/blackbar/faq/)
 * > Why can’t the profiler show time + amount of SQL queries you profile. As the
   > general sql profile is showing everything. Would be useful. And also to see
   > which queries are cached and not to better improve the calls. How do you check
   > if a query is cached by wordpress or not?
 * That is outside of the scope of this plugin.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Long sql code rows break the visual table’ is closed to new replies.

 * ![](https://ps.w.org/blackbar/assets/icon-256x256.png?rev=2864188)
 * [Black Bar](https://wordpress.org/plugins/blackbar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/blackbar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/blackbar/)
 * [Active Topics](https://wordpress.org/support/plugin/blackbar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/blackbar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/blackbar/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/long-sql-code-rows-break-the-visual-table/#post-13886018)
 * Status: resolved