Reply to Re: Exporting From MySQL to .csv using PHP

Your name:

Reply:


Posted by Martin Mandl - m2m tech support on 03/08/07 09:14

On Mar 8, 12:57 am, Iván Sánchez Ortega <ivansanchez-...@rroba-
escomposlinux.-.punto.-.org> wrote:
> mpar612 wrote:
> > [...]only lists the first result from the database.
>
> Nope - it lists the last one.
>
> > foreach($selects as $select) {
>
> > $content = $select[artist_name].",";
>
> You are destroying the previous contents of $content at every iteration.
>
> Try putting the header() up, and echoing things instead of putting them into
> variables, or try the .= operator.
>
> --
> ----------------------------------
> Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
>
> Un ordenador no es un televisor ni un microondas, es una herramienta
> compleja.

Dear mpar612,

if you need your results in that that array change your code e.g. to:

$i = 0;
foreach($selects as $select) {
$content[$i] = $select[artist_name].",";
$i++;
}

Good luck
Martin


------------------------------------------------
online accounting on bash bases
Online Einnahmen-Ausgaben-Rechnung
http://www.ea-geier.at
------------------------------------------------
m2m server software gmbh
http://www.m2m.at

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация