Tag Info

Hot answers tagged

5

I am not going to give any specific code but I will give you Idea how it can be done without creating any custom database table. I am assuming one driver per truck Algorithm Create two html list, make them sortable. Each list items represents a post type and have ID data field. Once sorting is done get all ids in order. Make two array one contains truck ...


1

If you plan to use it just for your own code, and have it running alongside WordPress' default database driver (wpdb), I see no real problems. It's only if you plan on fully integrating/overriding WP's driver that I see it being near-impossible; hard-coded SQL is prolific throughout core, and translating them to ActiveRecord method calls would defeat any ...


1

This is an answer I re-porpoised from a question that was abandoned. I thought this will help you solve this issue By default, all custom post types are excluded from the main query, that is why you don't see any posts when going to the front end author page. To accomplish this, you will need to modify the main query to include these post type/s. For this ...


1

First, you need to to find out what your current version of MYSQL... WordPress requires MySQL 5.0 or greater Since its a VPS, I'm assuming its a linux installation. Just type mysql -V on the command line and it will return your MYSQL version. If the version is compatible with wordpress, this message may be a "plugin/theme related" message. Look at your ...


1

query - you will get sql as argument of the callback. add_filter('query', 'some_callback_that_change_query'); function some_callback_that_change_query($sql){ remove_filter('query', 'some_callback_that_change_query'); // your banny wrote add_filter('query', 'some_callback_that_change_query'); return $sql; }


1

Your code looks good though. But Try the following approach - $current_date = $_POST['current_date']; $current_date = date( 'Y-m-d', strtotime($current_date) ); $post_id = (int) $_POST['post_id']; $query = $wpdb->prepare( "SELECT start_date FROM {$wpdb->prefix}booking_history WHERE start_date=%s AND post_id=%d", $current_date, $post_id ); /* ...



Only top voted, non community-wiki answers of a minimum length are eligible