How to access same name table fields in table join using db_fetch_object
You should name your fields in the SELECT, then you can use AS to rename them to something clearer:

SELECT fielda, fieldb, A.SNO AS thisone, B.SNO AS thatone, FROM... etc