note 9289 rejected and deleted from mssql_result by ronabop

From: Date: Thu, 26 Oct 2000 08:27:33 +0000
Subject: note 9289 rejected and deleted from mssql_result by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-7011@lists.php.net to get a copy of this message
I'm getting an error while fetching the results of a query (done with mssql_query). The fact is that in the result tehre are two columns with the same name. The query is something like: SELECT t1.ID_PER ,t1.NOMBRE ,t1.APELLIDOS ,t1.NACIONALIDAD , t1.FECHA_NACIM ,t1.PROFESION ,t1.SEXO ,b7.DESCRIPCION , b8.NOMBRE FROM personas t1, IDIOMAS b7, INSTITUCIONES b8 WHERE b7.ID_IDI = t1.REF_IDI AND b8.ID_INS = t1.REF_INS As you can see its acrossed query in which I get two columns with the same name (b1.nombre and b.8 nombre) I think this is what causes mssql_result to crash. I've tried to access the columns not with the column name but with the column number (i.e mssq_result($result_handle,$i,$j), but it is no use. This might be due to a previous resolution from column order number to column name (then column 8 woud be = 'nombre') and then the fetch is made with the column name, what makes the function to crash. I need HELP!!!!!

« previous php.notes (#7011) next »