Raj Sf,
Your question is a little ambiguous in that you're not clear in if this unique id is unique for data that might be the same in different rows or if its unique data for any row or why you really need a unique ID formatted like a MAC address as opposed to just a number that increments. If there is a database involved anywhere in the back end, i'd use the database's unique key field and then use that to generate the unique id.
The below is for if you are not using a back end database:
For example if you have a table that might contain rows with the same data, you would need to add a column that is unique - the simplest being an autonumber of some sort (eg, 1,2,3,4,5 and so on). You could then generate a unique id from that autonumber if you so wanted to (for example like the answer mleko gave).
If the data itself is unique per row, you could generate the unique id from a sha of the concatenated row value (ie join all the values in the row together and then perform a sha1() on the string and split however you'd like).
Personally, I'd go with the autonumber approach as you can be sure you are going to get the right row back!