I am connecting to a database to return a series of records as described by a certain DB processing function. The records are returned as a list, and I am then selecting one or more of these records and submitting the form again to a new page. What I want is the DB query string (not the results of the query) to be passed to the new page as well so I know what the query string was.
Here is the code I have (all custom functions I have written):
MAIN.PHP
Code: Select all
$dbname = "test_database" ;
$tablename = "records" ;
$db = dbopen( $dbname, $tablename ) ;
$db = dblookup( $db ) ;Code: Select all
echo "<tr>\n";
echo "\t<td nowrap><input name="records[]" type="checkbox" id="records" value="records[$db[3]]"</td>\n";
echo "\t<td nowrap>$db[3]</td>\n";
echo "</tr>\n";Code: Select all
function do_something_interesting( "$db", "$records" ) ;So, if I could print out the function I would get:
Code: Select all
do_something_interesting( "dblookup( dbopen( test_database, records ) )" , "1" ) ;The dblookup( dbopen( test_database, records ) ) is the information I want.
Does anyone know how I can return JUST the query string itself - not the results it gives as an array.
I can clarify if this question is not too clear.
Thanks in advance.