How to get EVENT based on startday, using BETWEEN

found the solution <3 Used WHERE ‘$startday’ BETWEEN dstart AND dend plus : OR dstart >= ‘$startday’ SELECT * FROM wp_posts, wp_mec_dates AS mecd, wp_icl_translations WHERE wp_posts.ID = mecd.post_id and post_status=”publish” AND wp_icl_translations.language_code=”$lang” AND (‘$startday’ BETWEEN dstart AND dend OR dstart >= ‘$startday’) AND wp_posts.ID = wp_icl_translations.element_id ORDER BY dstart LIMIT 0,6

Query is not work

I think the problem is in your transient set_transient( “7677recent_$my_paged”, $my_query, 60 * 60 ); This is currently refreshing every 1 hour you could try changing it to 3 or 5 mins for testins

finding out the top 5 source ( source is a custom taxonomy ), in a given category

Thanks to some leads from the wp-hackers list on this very question and some googling around, here is the answer to my problem $sql = “SELECT count(*) as count,terms2.name as tag FROM wp_posts as p1 LEFT JOIN wp_term_relationships as r1 ON p1.ID = r1.object_ID LEFT JOIN wp_term_taxonomy as t1 ON r1.term_taxonomy_id = t1.term_taxonomy_id LEFT JOIN … Read more

learn to run wpdb class

Arbitrary SQL query can be run via wpdb by using get_results() method: $results = $wpdb->get_results( $query ); You can work through documentation for wpdb at Codex to gain basic understanding of how it works.

Create a new page for each form selection

I can’t comment yet, so I’ll tell you here what you can change immediately: $countryinfo = $wpdb->get_row(“SELECT * FROM wp_num_countries WHERE countryID = “.$country_id); to $countryinfo = $wpdb->get_row($wpdb->prepare(“SELECT * FROM wp_num_countries WHERE countryID = %d”, $country_id)); because you directly use $_POST variable, so $wpdb->prepare will format and prepare your query string. But that code looks … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)