Using wp_list_table how to trigger update function “inline”?

ok not the most handsome solution but it works i transported the update function to update.php also wp-load.php $(“.col_visitor”).click(function(){ visitorID = $(this).attr(‘id’); //alert(‘testing ‘+visitorID); $.ajax({ url: ‘update.php’, data: {action: visitorID}, type: ‘post’, success: function(output) { //alert(output); window.location.reload(); //reload so we see the updated values } }); });//#end click

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.

Mysql query and odd results

You have to enclose the OR part to brackets: $sql = “SELECT ID,post_title,post_content,post_date,post_type FROM {$wpdb->posts} WHERE (post_content LIKE {$stuff}) AND post_status=”publish” AND post_type=”{$post_type}” AND ID != {$post->ID} LIMIT {$limit}”; $results= $wpdb->get_results($sql); Try this one: SELECT ID,post_title,post_content,post_date,post_type FROM wp_posts WHERE (post_content LIKE ‘%Battery%’ OR post_content LIKE ‘%Watcher%’ OR post_content LIKE ‘%Widget%’ OR post_content LIKE ‘%matches%’ OR … Read more

Modify query after meta value

Here’s an example using WP_Query‘s meta_query to query posts between two meta key values: $meta_query = array( array( ‘key’ => ‘event_date’, ‘value’ => array( $date_start, $date_end ), ‘compare’ => ‘BETWEEN’ ) ); $args = array( ‘posts_per_page’ => -1, ‘meta_key’ => ‘event_date’, ‘orderby’ => ‘meta_value’, ‘meta_query’ => $meta_query ); $results = new WP_Query( $args );

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