note 669 modified in odbc_result by ronabop
| From: | ronabop@php.net | Date: | Wed, 04 Oct 2000 15:25:53 +0000 |
| Subject: | note 669 modified in odbc_result by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-6058@lists.php.net to get a copy of this message | ||
Beware if you have fields with the same name in a result
$res = odbc_exec($conn,"select * from PeopleMR,People,Role,Organisation".
" WHERE PeopleMR.MeetingID = $MeetingID" .
" ORDER BY People.Surname");
I have the field "Name" from both TABLE Role and TABLE Organisation, as for MySQL you
would do :
mysql_result($res,$count,"Role.Name");
mysql_result($res,$count,"Organisation.Name");
but with odbc you do :
odbc_result($res,$count,"Name");
this gives you the result of TABLE Role "Name" so you have to find the Field Number for
the Organisation"Name" to have the correct result.
http://www.php.net/manual/function.odbc-result.php