Automator_DB_Handler_Recipes::log_run_pre_exists( int $recipe_id, int $user_id )


Parameters Parameters

$recipe_id

(int) (Required)

$user_id

(int) (Required)


Top ↑

Return Return

(string|null)


Source Source

File: src/core/lib/utilities/db/class-automator-db-handler-recipes.php

	public function log_run_pre_exists( int $recipe_id, int $user_id ) {
		global $wpdb;
		$tbl = Automator()->db->tables->recipe;

		return $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->prefix}{$tbl} WHERE completed = %d AND automator_recipe_id = %d AND user_id = %d", '-1', $recipe_id, $user_id ) ); //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
	}