Re: Informix Question (Still need help,please)

From: Date: Fri, 22 Jun 2001 08:23:23 +0000
Subject: Re: Informix Question (Still need help,please)
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-9722@lists.php.net to get a copy of this message
Hi, Have a try with something like this. Not tested and it's Friday ;o) $connid = ifx_connect(blah,blah,blah) or die("An error occurred connecting to database"); $Query = "SELECT tracknum,orderdate,ordertotal,status,shipdate ". "FROM orders ". "WHERE tracknum = '$trknum' "; $rid = ifx_query($Query, $connid, IFX_SCROLL) or die("An error occurred querying database"); $row = ifx_fetch_row($rid, "NEXT"); $orderdate = $row['orderdate']; $Query = "SELECT stuff ". "FROM somewhere ". "WHERE orderdate = '$orderdate' "; $rid = ifx_query($Query, $connid, IFX_SCROLL) or die("An error occurred querying database"); @ifx_htmltbl_result($rid,"border=1"); ifx_free_result ($rid); ifx_close($connid); Regards, - Paul - ----- Original Message ----- From: "wflow" <william@photorola.com> To: <php-db@lists.php.net> Sent: Thursday, June 21, 2001 10:23 PM Subject: Re: [PHP-DB] Informix Question (Still need help,please) > Chris, > > Thanks for the advice, of course I already did "rtfm" and the ifx_fetch_rows > entry did not really help me. It, in fact > > does NOT return an enumerated array, as the top line of the page states. It > ONLY returns an associative array. > If there was an ifx_fetch_array like the one for MySQL, I would not have to > even post this question. > > I only did post the question, because I needed help and figured I would ask > the experts, but all I got was somebody who says "rtfm" and most likely did > not read or understand my question, so, thanks a lot. > > > > B > > "Christian Haul" <haul@informatik.tu-darmstadt.de> wrote in message > news:9gsg0u$6nf$2@w153.z064000151.sjc-ca.dsl.cnc.net... > > "wflow" <william@photorola.com> wrote: > > > Hi All, > > > > > 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'. > > > > > @ifx_htmltbl_result($sql_result,"border=1"); > > > > You might want to consider reading the php manual, especially the part on > functions > > and even more the one on informix functions. There you'll find a function > > called ifx_fetch_row. > > > > Chris. > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > > For additional commands, e-mail: php-db-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.db (#9722) next »