Tag Info

New answers tagged

0

There are a few ways you could do it- NOT IN, NOT EXISTS, IS NULL. Which method is best depends on your actual query. SELECT * FROM $wpdb->posts LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id AND $wpdb->postmeta.meta_key = 'somekey' WHERE $wpdb->postmeta.post_id IS NULL


0

Import the database on the new server. When your domain name or URLs change there are additional concerns. The files and database can be moved, however references to the old domain name or location will remain in the database, and that can cause issues with links or theme display. If you do a search and replace on your entire database to change the URLs, ...


0

I ended up figuring this out by realizing that I could build a list of coauthor id's using the template tags that ship with the coauthors plugin. Next, I observed how WordPress core does joins to query by taxonomy, but var_dumping the posts_request on a term archive page. At that point, I just had to swap in my coauthor ID's and it works great.


0

I think the problem may be with your wildcards. Because you're trying to use Wildcards in the prepare, which takes %s, the WPDP doesn't know the difference between the wildcard % and the placeholder %. Using this answer as reference: How to use wildcards in $wpdb queries using $wpdb->get_results & $wpdb->prepare? You'll have to double-escape the ...


0

dbdelta demands that: You must put each field on its own line in your SQL statement. You must have two spaces between the words PRIMARY KEY and the definition of your primary key. You must use the key word KEY rather than its synonym INDEX and you must include at least one KEY. You must not use any apostrophes or backticks around field names. Field types ...



Top 50 recent answers are included