dbDelta SQL Query Not Working
This is invalid. PRIMARY KEY id (id) Should just be: PRIMARY KEY (id) Unlike other KEYs, PRIMARY KEYs don’t have identifiers or names. They don’t need them, because you can only have one.
This is invalid. PRIMARY KEY id (id) Should just be: PRIMARY KEY (id) Unlike other KEYs, PRIMARY KEYs don’t have identifiers or names. They don’t need them, because you can only have one.
It’s not possible in WordPress to have shared users between 2 separates installations on 2 separated databases. It could be possible just by hardcoding: hardcode WP_User class connect to other database and retrieve users from there hardcode get_metadata() function, that for wp_usermeta table connect to other database and retrieve users from there but mentioned solution … Read more
The best way to know which plugin was adding them is to search/grep your installation for occurrences of ‘wpAjax’ and “wpAjax”. If you find none (which is likely, since the oldest is 3 years old) safely delete from wp_postmeta where meta_key like ‘wpAjax%’, or something along those lines, if the latter statement might match something … Read more
In XHTML entities are not part of the DTD, and user agents are not required to support them. Exceptions: &, <, >, " and '. To keep WordPress X(HT)ML compatible numeric references are used instead.
You may not need extra custom tables. Create a custom post type for songs. Then store all the required data (link, name, date, size, etc.) as post meta data. The songs would be stored in the wp_posts table and the metadata in wp_postmeta.
Within $wpdb->insert, you are using %d which is used to store integer, use %f instead which will store float/decimal values. $registrering = $wpdb->insert( $wpdb->prefix . ‘registreringer’, array( ‘fiske_vaegt’ => $fiske_vaegt ), array( ‘%f’ ) );
It makes sense that if it’s faster to use a new table for a thousand entries, it must also be faster for tens or hundreds of entries. Performance is not about the pure number rows – the real amount of data and their structure counts. Usually, you use just the theme mod API. Your theme … Read more
If you change the DB structure than you are effectively not running wordpress any longer, but your fork of it. This is not always a negative thing to do as long as you are aware that once you do it there is no guaranty that any plugin or theme or future wordpress version will work … Read more
If you’re using Google Docs, then this plugin Google Spreadsheet Viewer might be helpful.
I sort of fixed your query. It needs a table and a WHERE condition to prevent changing all rows. Even a LIMIT 1 at the end won’t hurt. $rows_affected = $wpdb->query( $wpdb->prepare( “UPDATE {$table} SET removed = %s, post_id = %d, user_id = %d, status = %d;”, $cur_date = date(‘Y-m-d H:i:s’), $postid, $userid, 0 ) … Read more