sql_query("SELECT * FROM recipes WHERE products_used LIKE '%~".mysql_real_escape_string($_GET['n'])."~%' ORDER BY name ASC"); $totalrows = $row_count->num_rows(); $row_count->close(); if($totalrows > 0){ $pdb->sql_query("SELECT * FROM recipes WHERE products_used LIKE '%~".mysql_real_escape_string($_GET['n'])."~%' ORDER BY name ASC LIMIT 1"); if($pdb->num_rows() > 0){ $rp = $pdb->fetch_array(); } $prevlink = "roasted_garlic_serving_ideas.php?n=".mysql_real_escape_string($_GET['n']); $next = 2; if($next > $totalrows){ $nextlink = "roasted_garlic_serving_ideas.php?n=".mysql_real_escape_string($_GET['n']); }else{ $nextlink = "recipe_roasted_garlic.php?n=".mysql_real_escape_string($_GET['n'])."&pos=".$next; } }else{ $error = true; $prevlink = "roasted_garlic_serving_ideas.php?n=".mysql_real_escape_string($_GET['n']); $nextlink = "roasted_garlic_serving_ideas.php?n=".mysql_real_escape_string($_GET['n']); } $pdb->close(); }else if((isset($_GET['n'])) && (isset($_GET['pos']))){ $row_count = new sql; $row_count->sql_query("SELECT * FROM recipes WHERE products_used LIKE '%~".mysql_real_escape_string($_GET['n'])."~%' ORDER BY name ASC"); $totalrows = $row_count->num_rows(); $row_count->close(); if($totalrows > 0){ $offset = $_GET['pos']-1; $pdb->sql_query("SELECT * FROM recipes WHERE products_used LIKE '%~".mysql_real_escape_string($_GET['n'])."~%' ORDER BY name ASC LIMIT ".$offset.", 1"); if($pdb->num_rows() > 0){ $rp = $pdb->fetch_array(); } $prev = $_GET['pos']-1; if($prev < 1 ){ $prevlink = "roasted_garlic_serving_ideas.php?n=".mysql_real_escape_string($_GET['n']); }else{ $prevlink = "recipe_roasted_garlic.php?n=".mysql_real_escape_string($_GET['n'])."&pos=".$prev; } $next = $_GET['pos']+1; if($next > $totalrows){ $nextlink = "roasted_garlic_serving_ideas.php?n=".mysql_real_escape_string($_GET['n']); }else{ $nextlink = "recipe_roasted_garlic.php?n=".mysql_real_escape_string($_GET['n'])."&pos=".$next; } }else{ $error = true; $prevlink = "roasted_garlic_serving_ideas.php?n=".mysql_real_escape_string($_GET['n']); $nextlink = "roasted_garlic_serving_ideas.php?n=".mysql_real_escape_string($_GET['n']); } $pdb->close(); }else{ $pdb->close(); header('location: roasted_garlic.php'); exit(); } $moving_o = array(1,2,3,4,5); $dynamic_pos = array_rand($moving_o,1); ?> <? echo $pd['meta_title']; ?> O Olive Oil Recipe

Video

visit us on Facebook join us