Thank you very much, I do appreciate your help. Ur script doens work, but, curiously, it works when I changed a bit... select left(loc1,3) as locx, openart_id, tit1, pub1, id1, ref1 from openart_table If possible, can I ask one more thing? This part is the problem <A HREF="/momatlib/image/<? echo $row["locx"]; ?>.jpg"><? echo $row["locx"]; ?></A> I got 3 letters, but I would like to show all "loc1" data (eg "1-2 near entrance") in the table, and have first 3 letters of "loc1" for jpg hyperlink (http://www.heyjude.com/image/1-2.jpg). Do you know how to fix this? ----script------------------ $result = mysql_query("select left(loc1,3) as locx, openart_id, tit1, pub1, id1, ref1 from openart_table where tit1 like '%$tit%' and res1 like '%$res%' and pub1 like '%$pub%' and date1 like '%$date%' and id1 like '%$id%' and ref1 like '%$ref%' and loc1 like '%$loc%' and type1 like '%$type%' and vol1 like '%$vol%' and fre1 like '%$fre%' and note1 like '%$note%' order by tit1"); $rows = mysql_num_rows($result); echo $rows,"Record Found <p>"; while($row = mysql_fetch_array($result)){ ?> <tr> <td><a href = "openart_detail.php ?iden=<? echo $row["openart_id"] ?>"><? echo $row["openart_id"]; ?></a><br></td> <td><? echo $row["tit1"]; ?><br></td> <td><? echo $row["pub1"]; ?><br></td> <td><? echo $row["id1"]; ?><br></td> <td><? echo $row["ref1"]; ?><br></td> <td> <A HREF="/momatlib/image/<? echo $row["locx"]; ?>.jpg"><? echo $row["locx"]; ?> </A><br> </td> </tr> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php