Making CURDATE() recognize current_time()

$current_time = current_time(‘mysql’); $querystr = ” SELECT * FROM {$wpdb->prefix}usermeta WHERE meta_key=’bday_unix’ AND DATE_ADD( from_unixtime(meta_value), INTERVAL YEAR( ‘{$current_time}’ ) – YEAR( from_unixtime( meta_value ) ) YEAR ) BETWEEN ‘{$current_time}’ AND DATE_ADD( ‘{$current_time}’, INTERVAL 30 DAY )”; Should work, I think.

Multisite Tables the same as Single Install?

There’re some special tables Codex Link in Multisite. In short: No you can’t. But you can degrade to a single site install and then import them there. If in doubt, simply add a new local multisite install, import the posts there, downgrade to single site and then export/import again.

How to Import Multiple Values in custom field

The granularity of data in your example suggests that custom field (more so one with multiple values) would be wrong choice in first place. Think about it like this: only one dog might weight precisely 35.5kg — that is type of data appropriate for custom field multiple dogs (or dog breeds) might be of medium … Read more

`#1215 – Cannot add foreign key constraint

In order to make the wp_posts(ID) a REFERENCE for the FOREIGN KEY, you should also set the wp_pageviews.ID‘s attributes as UNSIGNED and keep the same data type for the wp_pageviews.ID as (bigint) . Let me know if this helps you.

Insert double entry in DB

Simple – if you do not want duplicate information then before you insert anything check if such data is already present. Just query for it and see if there is a match. From WP perspective however, you seem to be looking at technique (database table) that you will rarely need in practice. WordPress offers wealth … Read more