Ingredius Skills with Gaston Goldfish
'0'"; //condition $resREC = mysqli_query($mysqli, $sqlREC); // Store query results if ($resREC) // If there is a result: { $ResultsCounter = 0; while ($newarrayREC=mysqli_fetch_array($resREC, MYSQLI_ASSOC)) { $ResultsCounter ++; } $_SESSION['MaxPage'] = $ResultsCounter; // For the page turner scripts } else {printf("Could not read record: %s\n", mysqli_error($mysqli));} #------------------------------------------------------------------------------- #----------GENERATE 3 RANDOM INDEX NUMBERS IN THE AVAILABLE RANGE--------------- srand(date("z")); $sp1 = rand (1,$ResultsCounter/3); $sp2 = rand (($ResultsCounter/3)+1,$ResultsCounter*2/3); $sp3 = rand (($ResultsCounter*2/3)+1,$ResultsCounter); echo $num1.$num2.$num3; # --------------------------------RECIPE RETRIEVAL ENGINE ---------------------- $sqlREC ="SELECT * FROM recipes WHERE recipe_index = '$sp1' OR recipe_index = '$sp2' OR recipe_index = '$sp3'"; //condition $resREC = mysqli_query($mysqli, $sqlREC); // Store query results if ($resREC) // If there is a result: { $ResultsCounter = 0; while ($newarrayREC=mysqli_fetch_array($resREC, MYSQLI_ASSOC)) { $ResultsCounter ++; $RecipeIndex[$ResultsCounter] = $newarrayREC["recipe_index"]; $Name[$ResultsCounter] = $newarrayREC["name"]; $Headline[$ResultsCounter]= $newarrayREC["headline"]; } } else {printf("Could not read record: %s\n", mysqli_error($mysqli));} mysqli_free_result($resREC); #------------------------------------------------------------------------------- ?>
Search for an Ingredient

Find recipes using:


I prefer:
takeaway breakfast
treats drinks
less washing up
>gluten free >no cheese
>vegetarian >no dairy

©Ingredius 2009-2018

simple meals

Floating return button

Articles by Gaston:


Kitchen Skills

with
Gaston
Goldfish

“The view from the bowl”



Gaston

Menu  Recipe                               Help