Warning: Missing argument 2 for wpdb::prepare(), called in /home4/555/public_html/mysite.com/store/wp-content/plugins/amz-aff-store/smart_framework/functions/core.php on line 17 and defined in /home4/555/public_html/mysite.com/store/wp-includes/wp-db.php on line 992 line 17 return $wpdb->get_var($wpdb->prepare("SELECT COUNT(option_name) FROM $wpdb->options WHERE option_name = '$option';")); line 992 function prepare( $query, $args ) { Code (markup):
Dunno the code (or, rather, the wrappers you're using, but you do have a superfluous ; at the end there - change this: option_name = '$option';")); PHP: to option_name = '$option'")); PHP: Second, you're using wpdb completely wrong - which a quick Google-search would have told you. Have a look here: http://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/ And change the code further, to something like this: option_name = %s", $option)); PHP: And, I suggest reading up on the usage, or if this is a plugin, make sure you run the latest version.
Parse error: syntax error, unexpected '=' in /home4/555/public_html/mysite.com/store/wp-includes/wp-db.php on line 1747 Code (markup): added wp-db file /** * Retrieve the name of the function that called wpdb. * * Searches up the list of functions until it reaches * the one that would most logically had called this method. * * @since 2.5.0 * * @return string The name of the calling function */ function get_caller() { return wp_debug_backtrace_summary( __CLASS__ ); } /** * The database version number. * * @since 2.7.0 * * @return false|string false on failure, version number on success */ function db_version() { return preg_replace( '/[^0-9.].*/', '', mysql_get_server_info( $this->dbh ) ); } } option_name = %s", $option)); Code (markup):
Uh, the code above won't do anything, except throw an erro - you still need all the rest of the code you pasted in the first post, just change the end of the line to what I showed.
My point was - the file you posted, wp-db - if the last line in that file is option_name = %s", $options)); then you've done a booboo. And you really need to read up on PHP.