the following query is returning an empty set and i am not sure why:
if (($OutputPower == '75') || ($OutputPower == 'N/A'))
{
sql = Select * from $Tname1 WHERE 1".(($OutputPow er != 'N/A') ? "AND `Output Power` = '$OutputPower'" : "" );
so essentially it includes Output Power in the query as long as the user did not enter N/A.
it works fine if i just have:
sql = Select * from $Tname1 WHERE 1 AND `Output Power` = '$OutputPower'" ;
but this only considers the case when user enters 75 W.
any thoughts are appreciated
if (($OutputPower == '75') || ($OutputPower == 'N/A'))
{
sql = Select * from $Tname1 WHERE 1".(($OutputPow er != 'N/A') ? "AND `Output Power` = '$OutputPower'" : "" );
so essentially it includes Output Power in the query as long as the user did not enter N/A.
it works fine if i just have:
sql = Select * from $Tname1 WHERE 1 AND `Output Power` = '$OutputPower'" ;
but this only considers the case when user enters 75 W.
any thoughts are appreciated
Comment