Re: Informix Question (Still need help,please)
| From: | Dan Fitzpatrick | Date: | Fri, 22 Jun 2001 15:24:17 +0000 |
| Subject: | Re: Informix Question (Still need help,please) | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-9742@lists.php.net to get a copy of this message | ||
B,
Do your first query, then run this (for one record returned).
while($row = ifx_fetch_row($query_result_id)) {
for(reset($row); $fieldname=key($row); next($row)) {
$$fieldname = $row[$fieldname];
}
}
Do your second query.
The while statement will set each field value equal to the field name.
Dan
> > What I want to do is create another query from some of the data from
another
> > one. The question is how do I take the data I get back from my first
query
> > and put that into variables so I can build my second query. The example
I
> > have in mind is:
>
> > I a do a select tracknum,orderdate,ordertotal,status,shipdate from
orders
> > where tracknum = '$trknum' and I want the data returned into vars: like
> > orderdate = $orderdate so I can create a new query like: select * from
> > shipping where orderdate = '$orderdate'.
>