forse dovresti fare
Codice PHP:
$test mysql_query("SELECT colX FROM tab WHERE colY='pippo'");     
if(
$row['colX'] == 'a') { // eccetera