yii2support icon indicating copy to clipboard operation
yii2support copied to clipboard

Unexpected inspection error for Yii::$app->db->createCommand()

Open ddcatgg opened this issue 7 years ago • 0 comments

What steps will reproduce the problem?

write code:

$command = \Yii::$app->db->createCommand("SELECT GetClientPlannedreturnmonyCount(:repId) AS result");
$command->bindValues([':repId' => $rep->RepID]);

What is the expected result?

Don't show the inspection error, becuase the parameters provided by bindValues() method in the next line.

What do you get instead?

I got an inspection error:

image1

Condition parameters must be defined less... (Ctrl+F1) Inspection info: Analyzes SQL condition and checks if all declared parameters are set

Additional info

Q A
IDE Name PhpStorm
IDE Version 2018.2
Plugin version 0.9.54.9
Yii App Template basic / advanced

Thanks!

ddcatgg avatar Aug 07 '18 10:08 ddcatgg