note 18138 deleted from function.mssql-fetch-row by vincent
| From: | vincent@php.net | Date: | Sat, 30 Aug 2003 19:23:56 +0000 |
| Subject: | note 18138 deleted from function.mssql-fetch-row by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-55357@lists.php.net to get a copy of this message | ||
Note Submitter: Yagi <alisson@sistemasabertos.com.br>
----
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.