Title: PHP Notice: Function wpdb::prepare was called incorrectly.
Last modified: March 5, 2024

---

# PHP Notice: Function wpdb::prepare was called incorrectly.

 *  Resolved [koolpal007](https://wordpress.org/support/users/koolpal007/)
 * (@koolpal007)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/php-notice-function-wpdbprepare-was-called-incorrectly/)
 * Hi,
 * This is seen during a fresh install
 * When installing this plugin with debug.log enabled, it triggers a notice
   `[05-
   Mar-2024 14:40:42 UTC] PHP Notice: Function wpdb::prepare was called incorrectly.
   The query argument of wpdb::prepare() must have a placeholder. Please see Debugging
   in WordPress` for more information. (This message was added in version 3.9.0.)
   in [path]\wp-includes\functions.php on line 6031
 * Additional digging seems to point to
 * [path]\wp-content\plugins\classified-listing\app\Database\Migrations\Forms.php
 * Line 39 onwards
 *     ```wp-block-code
       		// Create new form if table is empty
       		if ( $wpdb->get_var( "SHOW TABLES LIKE '$table'" ) ) {
       			$row = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) from $table" ) );
       			if ( ! $row ) {
       				$formData = FormPreDefined::sample();
       				Form::query()->insert( $formData );
       			}
       		}
       	}
       }
       ```
   
 * Please check and guide.
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Muhammad Ali Akbar](https://wordpress.org/support/users/alireyad/)
 * (@alireyad)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/php-notice-function-wpdbprepare-was-called-incorrectly/#post-17477401)
 * Hi,
   Yes, we fixed it. Will get in next update.
 * Thank you
 *  Plugin Support [Muhammad Ali Akbar](https://wordpress.org/support/users/alireyad/)
 * (@alireyad)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/php-notice-function-wpdbprepare-was-called-incorrectly/#post-17507369)
 * Hi,
   Updated plugin, fixed the issue in version 3.0.4
 * Thank you

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP Notice: Function wpdb::prepare was called incorrectly.’ is closed
to new replies.

 * ![](https://ps.w.org/classified-listing/assets/icon-256x256.gif?rev=3004059)
 * [Classified Listing – AI-Powered Classified ads & Business Directory Plugin](https://wordpress.org/plugins/classified-listing/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/classified-listing/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/classified-listing/)
 * [Active Topics](https://wordpress.org/support/plugin/classified-listing/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/classified-listing/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/classified-listing/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Muhammad Ali Akbar](https://wordpress.org/support/users/alireyad/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/php-notice-function-wpdbprepare-was-called-incorrectly/#post-17507369)
 * Status: resolved