note 18138 added to function.mssql-fetch-row

From: Date: Fri, 11 Jan 2002 18:17:03 +0000
Subject: note 18138 added to function.mssql-fetch-row
Groups: php.notes 
Request: Send a blank email to php-notes+get-24678@lists.php.net to get a copy of this message
Notes for this function are unnecessary, but...here goes: <?php connect("sqlserver","user,"password"); $query = mysql_query("SELECT * FROM TABLE"); for ($i = 0;$line = mysql_fetch_row($query);++$i) { echo "Name: ".$line[0]; echo "Tel Number: ".$line[2]; ... } mysql_close(); ?> If you want to get the value of the first column you must give the index zero to the array('$line[0]'); for the second column the index must be one ('$line[1]'); etc, etc, etc. -- http://www.php.net/manual/en/function.mssql-fetch-row.php http://master.php.net/manage/user-notes.php?action=edit+18138 http://master.php.net/manage/user-notes.php?action=delete+18138 http://master.php.net/manage/user-notes.php?action=reject+18138

« previous php.notes (#24678) next »