I have a stock table and column number , if the number of stocks is less than 100 then appears message " stock is less than 100 pcs " , a message that appears when we want to input the data ( create.php ) , how to make his syntax ? : /
If you already have your models, then you can in create.php make something like:
$stock= Stock::model()->findByPk($stockId);
if($stock->number < 100) echo 'S[color=#1C2837][size=2]tock is less than 100 pcs[/size][/color][size=2]'[/size]
[size="2"]This will print you message only for one specific stock which ID you provided to [font="Courier New"]findByPk [/font]function.[/size]
[size=“2”]Please give me more details, and I will help you better [/size]
so I got a blangko table . and if the value of " jumlah_blangko " less than 100 ,then the warning message " jumlah_blangko less than 100 " . where I have to put the script in a file create.php ?
I want to alert this message appears when I would enter the new data as setFlash alerts …thank you for help me