RE: [PHP-WIN] php and while...newbie Q

From: Date: Tue, 06 Aug 2002 10:20:12 +0000
Subject: RE: [PHP-WIN] php and while...newbie Q
Groups: php.windows 
Request: Send a blank email to php-windows+get-15139@lists.php.net to get a copy of this message
guess i was not very clear.. i hv 15 records(jobs) in table A... These records(jobs) are also present in table B only if they are closed (and have a date).. I need to show the 15 records from the table A independent of whether they r present in table B or not.. Right now, one of the records from Table A has a closing date in table B.. So, what happens is that I still show only the 15 records but one of the record has a closing date obtained from table B.. thats why I have 2 queries and 2 resultsets... my queries read as following: I query: SELECT pruebas.job AS cod, pruebas.numeroPrueba AS num, pruebas.descripcion AS des, pruebas.prioridad AS priority FROM pruebas WHERE (pruebas.tipo='01' AND pruebas.servicio='01FUT' AND pruebas.subservicio='0115')ORDER BY num II Query:$sqldate ="SELECT resultados.job,resultados.closingDate AS dat FROM resultados WHERE resultados.job = '$fila[cod]'"; I can prob use a join but it doesnt seem to work... any suggestions?? thnx -----Original Message----- From: Sichta Daniel [mailto:Daniel.Sichta@swh.sk] Sent: terça-feira, 6 de Agosto de 2002 11:10 To: Sandeep Murphy Subject: RE: [PHP-WIN] php and while...newbie Q hi, does it mean you want to display 16 or 30records ? DS -----Original Message----- From: Sandeep Murphy [mailto:sandeep.murphy@oni.pt] Sent: Tuesday, August 06, 2002 12:05 PM To: php hlp list Subject: [PHP-WIN] php and while...newbie Q Hi, I have the fwg code where the first resultset $fila has 15 records while the second one $info has 1 record.. I need to display all the 15 records along with the 1 record of the second while loop.. I cannot put the display code inside the second while as it wud print only 1 record and the queries has to be separate too.. any suggestion as to how i can resolve this?? thnx, sands while( $fila = mysql_fetch_array($resultado)) { while($info = mysql_fetch_array($resultdate)){ } } -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.windows (#15139) next »