• lcwakeman

    (@lcwakeman)


    I have a large table with over 80 columns defined. When I use $wpdb->insert to insert a row, the row is not inserted, no error is returned and the last query from the wpdb object is “SHOW FULL COLUMNS FOR <table>”. Same happens when I try to update the row. There must be a limit to the number of columns or the size of he query. I can’t find any documentation on a limit. I am able to do a full row import using phpmyadmin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • catacaustic

    (@catacaustic)

    If you’re having problems with that, it might be better off writing the SQL query manually (with the proper escaping, of course), and run that thquery through $wpdb->query() instead of using the built-in $wpdb->insert() function. That way you’ll see any errors, as well as ensuring that there’s no extra queries being performed.

    Thread Starter lcwakeman

    (@lcwakeman)

    I tried your suggestion and it works but I am still perturbed that here is a limit on insert and update that are not documented.

    Well I used to work for Digital and their documentation was very complete and I got used to that.

    catacaustic

    (@catacaustic)

    Limits on things like that tend to be more server related, but to find out what’s happening the best thing you can do is go though the source code to see what is actaully happening. There’s obviously something that’s querying for the columns in the table, but I don’t know wher that is (I haven’t looked through there enough yet).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Large inserts and updates with $wpdb object’ is closed to new replies.