dhrups Posted May 5, 2006 Share Posted May 5, 2006 can anyone help me out? I am trying to output a text or pop up box or something of the sort, to notify a user of the system, when the stock level reaches a minimum level. currently i am doing this manually, but i would like to generate this message automatically.the code used for the manual notification is:[b]machine_stock_level.php[/b]<?php$result = mysql_query("SELECT category, model_number, quantity FROM main_stock WHERE quantity <= 10 ORDER BY category");$row = mysql_numrows($result);$i=0;while ($i < $row){$Category = mysql_result($result,$i,"category");$Model_number = mysql_result($result,$i,"model_number");$Quantity = mysql_result($result,$i,"quantity");?><tr><td width="276" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" height="19"><b><font face="Arial, Helvetica, sans-serif"><? echo $Category; ?></font></b> </td><td width="200" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1" height="19"><b><font face="Arial, Helvetica, sans-serif"><? echo $Model_number; ?></font></b> </td><td width="201" align="center" style="border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" height="19"><b><font face="Arial, Helvetica, sans-serif"><? echo $Quantity; ?></font></b> </td></tr><?$i++;}?></tr></table> Quote Link to comment https://forums.phpfreaks.com/topic/9125-sending-a-notification/ Share on other sites More sharing options...
ober Posted May 5, 2006 Share Posted May 5, 2006 I'm not sure I understand how the code you posted relates to the problem.Everytime you run that script, you should just add in another query to check the stock level and if the results of the query match your level... you echo a message. Maybe you can explain the problem a little more? Quote Link to comment https://forums.phpfreaks.com/topic/9125-sending-a-notification/#findComment-33568 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.