ok first off i would not have a table called $tabla2, actually i'm not sure if you are actually allowed $ in front of the table name but hey i could be wrong.
can you post line 43 so i can have a look at it?
lastly ensure that the field names correspond to what the fields are called in the db; ie are Inmo and Sesion the same names in the db and are they capitalised?