Reply to Re: [PHP] [NEWBIE] Trying to combine array into one string

Your name:

Reply:


Posted by Matt M. on 10/04/02 11:08

> The Problem:
> I can't quite figure out how to take the results of the
> mysql_query() and assemble them into a string. In my experiments so far,
> I either get a "mysql_data_seek(): Offset 0 is invalid for MySQL result
> index" error, or my mail function sends to a blank address.

no guarantee it works:

$tantoQuery = "SELECT forum_members.emailAddress AS email FROM
forum_members, event_tanto WHERE forum_members.ID_MEMBER =
event_tanto.tanto AND event_tanto.event ='" . $show . "'";

$tantoResult = mysql_query($tantoQuery) or die('Query failed: ' .
mysql_error());

while ($tantoData = mysql_fetch_array($tantoResult, MYSQL_ASSOC))
{
$tantoEmail[] = $tantoData['email'];
}

if (count($tantoEmail) > 0) {
mail(implode(',',$tantoEmail), $subject, $mailcontent, $addHeaders);
}


mysql_free_result($tantoResult);

[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

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