• Resolved blogtj

    (@blogtj)


    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes) in /public_html/wp-includes/wp-db.php on line 2349

    that line is: $new_array[] = array_values( get_object_vars( $row ) );

    when i try to see all the coloumns of one table the plugin dies.
    if i limit the query it work very well…

    what can i do?

    thank you

    https://www.ads-software.com/plugins/wp-db-table-editor/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author bobbysmith007

    (@bobbysmith007)

    Whelp, your table must have too much data in the results (it claims it exhausted 270megs which is too much to send to the client anyway). In situations like this I have added custom buttons and server side paging (eg: display only a single year/month of results at a time and have a button that changes what is displayed. This is fairly easy to accomplish if you set the sql parameter of add_db_table_editor and use request variables to determine what set to see.

    You can use jquery to shim in a button (by loading a custom script on the admin page that displays the editor of your choice). If you need more details please let me know and I can probably find an example

    Thread Starter blogtj

    (@blogtj)

    a paging system would be really nice – i didn;t find any example… can you help me? thank you

    Thread Starter blogtj

    (@blogtj)

    i want to make a page system… can you help telling me where to put this code… where is the page that shows the table?

    $page_links = paginate_links( array(
    ‘base’ => add_query_arg( ‘pagenum’, ‘%#%’ ),
    ‘format’ => ”,
    ‘prev_text’ => __( ‘«’, ‘text-domain’ ),
    ‘next_text’ => __( ‘»’, ‘text-domain’ ),
    ‘total’ => $num_of_pages,
    ‘current’ => $pagenum
    ) );

    if ( $page_links ) {
    echo ‘<div class=”tablenav”><div class=”tablenav-pages” style=”margin: 1em 0″>’ . $page_links . ‘</div></div>’;
    }

    Thread Starter blogtj

    (@blogtj)

    or any other solutions is welcomed ??

    thank you for your help

    Plugin Author bobbysmith007

    (@bobbysmith007)

    Alright I just committed an example of paging by year. Hopefully you can extrapolate that into paging / filtering by any random thing

    PHP: https://github.com/AccelerationNet/wp-db-table-editor/blob/master/examples/paging.php

    JS: https://github.com/AccelerationNet/wp-db-table-editor/blob/master/examples/payment-paging.js

    Cheers, and hope this helps

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error: Allowed memory size of’ is closed to new replies.