find field and put values into array?

wxdqz

New Member
I would like to find all records where the date and name is the same as the specified varibales $date and $name. I have this field called ID. I want to find all the values of ID and store it in $ids. Then I would like to update the page with the all ID values separated with commas. I haven磘 succeeded. I just find the latest ID and it's doubled, like 123456,123456. Here磗 my code;

$sql ="SELECT ID FROM likvid WHERE DATUM='$date' and NAMN='$name'";
$result = mysql_query($sql,$db);

while ($idnummer=mysql_fetch_array($result)) {
$ids=IMPLODE ($idnummer,",");
}

header ("Location: likvid_update.php?ids=$ids");

Thanks!
 
Back
Top