| |
|
=$voteMessage?>
$searchRecipes = $_REQUEST["searchRecipes"];
//$sqlrp = 'select recipes.ID, recipes.Brief, recipes.Recipe_Name, recipes.Prep_Time_Hours, recipes.Prep_Time_Minutes, users.First_Name, users.State_Reside, recipes_cat.Name, recipes_sub_cat.Name from recipes, users,recipes_cat,recipes_sub_cat where ((recipes_cat.ID = recipes.Category) and (recipes_cat.ID = recipes_sub_cat.recipes_cat_ID) and (users.ID = recipes.User_ID)) and ((Recipe_Name like "%'.$searchRecipes.'%") or (recipes_cat.Name like "%'.$searchRecipes.'%") or (recipes_sub_cat.Name like "%'.$searchRecipes.'%")) and (Recipe_Name != " " ) order by recipes.TXN_TS desc';
$sqlrp = 'select recipes.TXN_TS as TXN_TS, recipes.User_ID, recipes.ID, recipes.winner, recipes.Brief, recipes.Recipe_Name, recipes.Prep_Time_Hours, recipes.Prep_Time_Minutes, recipes_cat.Name, recipes_sub_cat.Name, recipes_ingredients.Ingredient from recipes, recipes_cat, recipes_sub_cat, recipes_ingredients
where ((recipes_cat.ID = recipes.Category) and (recipes_cat.ID = recipes_sub_cat.recipes_cat_ID) and (recipes.ID = recipes_ingredients.Recipe_ID)) and ((Recipe_Name like "%'.$searchRecipes.'%") or (recipes_cat.Name like "%'.$searchRecipes.'%") or (Ingredient like "%'.$searchRecipes.'%")) and (Recipe_Name != " " ) order by recipes.TXN_TS desc';
$holdTXN_TS = "";
$resultrp = mysql_query($sqlrp) or die(mysql_error());
while($myrowrp=MySQL_fetch_array($resultrp)){
$winner = $myrowrp["winner"];
if($holdTXN_TS <> $myrowrp["TXN_TS"]){
$holdTXN_TS = $myrowrp["TXN_TS"];
//get user info
$uName = "";
$uState = "";
$SelectStrU = "SELECT * FROM users where (ID = '" . $myrowrp["User_ID"] . "') ";
$resultrU = mysql_query($SelectStrU ) or die(mysql_error());
if($myrowrU=MySQL_fetch_array($resultrU)){
$uName = $myrowrU["First_Name"];
$uState = $myrowrU["State_Reside"] ;
}
if ( $myrowrp["Photo"] > " "){
?>
"0000-00-00"){?> Style="position:relative; left:-25px;" } ?>>
if($winner > "0000-00-00"){?> | } ?>
); background-position:top; background-repeat:no-repeat"> |
|
| = $myrowrp["Recipe_Name"] ?>
|
|
|
if( $myrowrp["Brief"] > " " ){ echo $myrowrp["Brief"] . " "; } ?>
Prep time
= $myrowrp["Prep_Time_Hours"] ?>
:
= $myrowrp["Prep_Time_Minutes"] ?>
Submitted by
= $uName ?>
if($uState > " "){ echo "of " . $uState; } ?>
" class="rightTopNavLinks style30">[Find out the recipe] |
|
}else{
?>
"0000-00-00"){?> Style="position:relative; left:-25px;" } ?>>
if($winner > "0000-00-00"){?> | } ?>
| = $myrowrp["Recipe_Name"] ?>
|
|
|
if( $myrowrp["Brief"] > " " ){ echo $myrowrp["Brief"] . " "; } ?>
Prep time
= $myrowrp["Prep_Time_Hours"] ?>
:
= $myrowrp["Prep_Time_Minutes"] ?>
Submitted by
= $uName ?>
if($uState > " "){ echo "of " . $uState; } ?>
" class="rightTopNavLinks style30">[Find out the recipe] |
|
}
}
}
?>
|
|
|