Created
April 17, 2020 08:14
-
-
Save platoosom/a7c2544a4930c4a06ba384e4c76936df to your computer and use it in GitHub Desktop.
wordpress query data from custom table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check post by postmeta | |
* @param $LinkUrl | |
* @return int | |
*/ | |
function topgear_post_exists_by_LinkUrl($LinkUrl) | |
{ | |
global $wpdb; | |
$wpdb->get_results("SELECT ID FROM `{$wpdb->base_prefix}imported_articles` WHERE LinkUrl = '".$LinkUrl."' "); | |
return $wpdb->num_rows; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment