note 72566 added to function.mssql-fetch-assoc

From: Date: Wed, 24 Jan 2007 17:35:14 +0000
Subject: note 72566 added to function.mssql-fetch-assoc
Groups: php.notes 
Request: Send a blank email to php-notes+get-122145@lists.php.net to get a copy of this message
Beware when using mssql_fetch_assoc() to return data pulled in from joined tables; if the tables have the same column names, the column mentioned last will overwrite the prior one when populating the assoc. Example: <? $result = mssql_query('SELECT articles.id, issues.id FROM articles, issues WHERE articles.pub_date = issues.pub_date'); $record = mssql_fetch_assoc($result); print_r($record); /* Prints: Array ( [id] => 123 ) */ ?> ---- Server IP: 69.147.83.197 Probable Submitter: 209.63.134.99 ---- Manual Page -- http://www.php.net/manual/en/function.mssql-fetch-assoc.php Edit -- https://master.php.net/note/edit/72566 Del: integrated -- https://master.php.net/note/delete/72566/integrated Del: useless -- https://master.php.net/note/delete/72566/useless Del: bad code -- https://master.php.net/note/delete/72566/bad+code Del: spam -- https://master.php.net/note/delete/72566/spam Del: non-english -- https://master.php.net/note/delete/72566/non-english Del: in docs -- https://master.php.net/note/delete/72566/in+docs Del: other reasons-- https://master.php.net/note/delete/72566 Reject -- https://master.php.net/note/reject/72566 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#122145) next »