| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Sebastian Burg | Date: | January 3 2005 6:48pm |
| Subject: | Re: doing SELECTS and keeping the array intact with php | ||
| View as plain text | |||
julian haffegee schrieb: > Hi all, > > this has been bugging me for some time now. > > I want to do a mysql select > then using php > > while ($a_row = mysql_fetch_array($result)) > { > do something to get a small portion of the data > } > > hi julian, how about using this snip $result = mysql_query($sql)or die("fehler:".mysql_error()); $num = mysql_num_rows($result); $erg = array(); for ($i = 0; $i < $num; $i++) { $erg[$i] = array(); $erg[$i] = mysql_fetch_object($result); } i work with it, and its just fine. put it in a function or a class and you wont have to bother about processing the results anymore. have fun. greetz seba --------------- http://www.helft-sebastian.de http://www.schaudirmaldiean.de http://www.random-link.com
| Thread | ||
|---|---|---|
| • use of soundex in queries | Raphael Matthias Krug | 31 Dec |
| • Re: use of soundex in queries | SGreen | 31 Dec |
| • Re: use of soundex in queries | Raphael Matthias Krug | 31 Dec |
| • Re: use of soundex in queries | SGreen | 31 Dec |
| • doing SELECTS and keeping the array intact with php | julian haffegee | 3 Jan |
| • Re: doing SELECTS and keeping the array intact with php | Peter Brawley | 3 Jan |
| • Re: doing SELECTS and keeping the array intact with php | Sebastian Burg | 3 Jan |
| • Re: use of soundex in queries | Sasha Pachev | 1 Jan |
| • Re: use of soundex in queries | Raphael Matthias Krug | 1 Jan |
| • Re: use of soundex in queries | Sasha Pachev | 14 Jan |
| • Complex joining - multiple tables to one | Ville Mattila | 3 Jan |
| • Re: Complex joining - multiple tables to one | SGreen | 4 Jan |
| • Re: use of soundex in queries | Kevin A. Burton | 3 Jan |
| • RE: doing SELECTS and keeping the array intact with php | Jay Blanchard | 3 Jan |
| • RE: doing SELECTS and keeping the array intact with php | Tom Crimmins | 3 Jan |
