Re: no temp var for mysql_fetch_array results
| From: | David T-G | Date: | Tue, 11 May 2004 22:38:06 +0000 |
| Subject: | Re: no temp var for mysql_fetch_array results | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-34371@lists.php.net to get a copy of this message | ||
Jeff (and John) --
..and then jeffrey_n_Dyke@Keane.com said...
%
..
% > $r = mysql_query($q,$dbro) ;
% > $row = mysql_fetch_array($r) ;
% > $i = $row[0] ;
..
% >this one row (not looping), could I just
% >
% > $i = mysql_fetch_array($r)[0] ;
%
% Hi David....
Hi!
% How about:
% $i = mysql_result(mysql_query($q,$dbro),0);
Oooh! Cool! Just right.
% HTH
% Jeff
Thanks & HAND
:-D
--
David T-G
davidtg@justpickone.org
http://justpickone.org/davidtg/ Shpx gur
Pbzzhavpngvbaf Qrprapl Npg!