Re: Transfer query result to another script
| From: | Jim Lucas | Date: | Fri, 02 Nov 2007 15:34:44 +0000 |
| Subject: | Re: Transfer query result to another script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-263984@lists.php.net to get a copy of this message | ||
C.R.Vegelin wrote:
Hi All, Q: Is it possible to transfer a query result to another script ? For example with (fragments of) the following 2 scripts: Engine.php ---------------- $result = mysqli_query($connect, $myquery); if (!$result) error ... if (mysqli_num_rows($result) == 0) error ... $_SESSION['result'] = $result; header("Location: Report.php"); Report.php ---------------- $result = $_SESSION['result']; while ($row = mysqli_fetch_array($result)) ... This last line gives "Couldn't fetch mysqli_result". Is this because the result set is local to Engine.php ? TIA, CorIf all you are wanting to do is make a table layout sortable, why not use something like this? http://www.kryogenix.org/code/browser/sorttable/ -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare