Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Ron Fredericks

    (@ronf)

    same problem in one more file: wiki_dashboard_widget.php

    on line 12, add dummy 0 , as 2nd argument to $wpdb->prepare() like this:


    $posts = $wpdb->get_results($wpdb->prepare("select * from $wpdb->posts where ID in (
    select post_id from $wpdb->postmeta where
    meta_key = 'wiki_page' and meta_value = 1)
    or post_type in ('wiki') order by post_modified desc limit 5", 0)); // add dummy variable to satisfy argument 2 warning, RDF

    Hi,
    I have the same problem but in the Ads section: Warning: Missing argument 2 for wpdb::prepare(), called in /home/qantroco/public_html/clisko.com/wp-content/themes/classipress/includes/admin/admin-options.php on line 870 and defined in /home/qantroco/public_html/clisko.com/wp-includes/wp-db.php on line 992. I found the stream but don’t know how to modify it.

    line 870: $ad_rev_total = $wpdb->get_var( $wpdb->prepare( “SELECT sum(mc_gross) FROM $wpdb->cp_order_info” ) );

    line 992: function prepare( $query, $args ) {

    Any help would be appreciated.
    Regards,
    Tradock

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Missing argument 2 for wpdb::prepare()’ is closed to new replies.