SendSQL("select product from products where product='$Product'");
SendSQL("select name from products where name = ".SqlQuote($Product));
my$Result=FetchOneColumn();
if(lc($Result)eqlc($Product)){
return$Result;
...
...
@@ -211,7 +211,7 @@ sub CheckComponent {
my$Product=shift;
my$Component=shift;
SendSQL("select value from components where program=".SqlQuote($Product)." and value=".SqlQuote($Component)."");
SendSQL("select components.name from components, products where components.product_id = products.id AND products.name=".SqlQuote($Product)." and components.name=".SqlQuote($Component));
my$Result=FetchOneColumn();
if(lc($Result)eqlc($Component)){
return$Result;
...
...
@@ -226,7 +226,7 @@ sub CheckVersion {
my$Product=shift;
my$Version=shift;
SendSQL("select value from versions where program=".SqlQuote($Product)." and value=".SqlQuote($Version)."");
SendSQL("select value from versions, products where versions.product_id = products.id AND products.name=".SqlQuote($Product)." and value=".SqlQuote($Version));