I have a search query
$sql = "SELECT * FROM myTbl WHERE 1 = 1";
$sql .= empty($_POST['q']) ? NULL : " AND var1 LIKE '%".$_POST['q']."%'";
$sql .= empty($_POST['q']) ? NULL : " AND var2 LIKE '%".$_POST['q']."%'";
if($searchResults = $db->get_results($sql)) {
foreach ( $searchResults as $search )
{
echo "RESULTS OUTPUT HERE";
}
} else {
echo "Nothing found";
}
How difficult will it be to grab some of the results and push them into a temp table, so that I could break the output lines per page?
How would I expire these results on the next search or over time?
Is it a good idea to go that way at all?