bradgrafelman wrote:What makes you say that? If that echo() statement only produces one line, then only one row was matched in the table; otherwise, it will output all rows matched.
Not exactly sure why I made that assumption, I think it must have come from my past experimentations with php... my newbieness probably caused me to draw the wrong assumption of that.
Well then you'd simply add a link such as record.php?id=5 where '5' is some unique data that you use to identify each row (commonly an AUTO_INCREMENT column).
So then are you saying the following code should do the job?
$query = "SELECT `recnum`,`field1`,`field2` FROM `db` WHERE `field1` LIKE '%$search%' OR `field2` LIKE '%$search%'";
$run = mysql_query($query);
while($arr = mysql_fetch_assoc($run)){
extract($arr);
echo "<a href="record.php?id=$recnum">$field1 $field2</a> <br />";
}
not sure my syntax is correct regarding the quotes though....