• adjayabdg

    (@adjayabdg)


    Please advise, i get issue like this:

    Warning: Missing argument 2 for wpdb::prepare(), called in /home3/adjaya/public_html/wp-content/themes/jobboard/plugin/includes/ext/jb_stats.php on line 82 and defined in /home3/adjaya/public_html/wp-includes/wp-db.php on line 1152

    Warning: Missing argument 2 for wpdb::prepare(), called in /home3/adjaya/public_html/wp-content/themes/jobboard/plugin/includes/ext/jb_stats.php on line 149 and defined in /home3/adjaya/public_html/wp-includes/wp-db.php on line 1152

    Warning: Missing argument 2 for wpdb::prepare(), called in /home3/adjaya/public_html/wp-content/themes/jobboard/plugin/includes/ext/jb_stats.php on line 149 and defined in /home3/adjaya/public_html/wp-includes/wp-db.php on line 1152

    Warning: mysql_query(): Access denied for user ‘root’@’localhost’ (using password: NO) in /home3/adjaya/public_html/wp-content/themes/jobboard/plugin/includes/ext/jb_stats.php on line 126

    Warning: mysql_query(): A link to the server could not be established in /home3/adjaya/public_html/wp-content/themes/jobboard/plugin/includes/ext/jb_stats.php on line 126

    here jb_stats.php:
    function jb_getHits($jobid, $unique) {
    global $wpdb;

    switch($unique) {
    case true:
    $query = “SELECT COUNT(ip) FROM “.$wpdb->prefix.”jobboard_stats WHERE postid = ‘”.$jobid.”‘ AND ip = ‘2130706433’”;
    break;
    case false:
    $query = “SELECT COUNT(ip) FROM “.$wpdb->prefix.”jobboard_stats WHERE postid = ‘”.$jobid.”‘ AND ip != ‘2130706433’”;
    break;
    }
    return $wpdb->get_var($wpdb->prepare($query));

    }

    ?>

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