The following query:
$getiplist = mysql_query($questions, $link)or die(mysql_error());
$numofips = mysql_num_rows($getiplist);
Gaves me a result of 21.
If I echo the results:
while($row = mysql_fetch_array($getiplist))
{
foreach($row as $column)
echo $row['e_mail_rest']."<br>";}
I get 42 results, each result is being duplicated so I get each twice.
I'm trying to see where am I stumbling but I do not get it.
Where's the stupid mistake?
Duplicate results
Moderator: General Moderators
why do you have the foreach u r already looping through the results with the while
And may i ask why have you posted this question twice??
Code: Select all
while($row = mysql_fetch_array($getiplist)) {
echo $row['e_mail_rest']."<br>";
}- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact: