Additions:
$row = mysql_fetch_array() defaults to MYSQL_BOTH, you'll get an array with both associative and number indices.
$row = mysql_fetch_assoc() or MYSQL_ASSOC, you only get associative indices
$row = mysql_fetch_row() or MYSQL_NUM, you only get number indices
$row = mysql_fetch_assoc() or MYSQL_ASSOC, you only get associative indices
$row = mysql_fetch_row() or MYSQL_NUM, you only get number indices
Deletions:
$row = mysql_fetch_assoc() ==MYSQL_ASSOC, you only get associative indices
$row = mysql_fetch_row() == MYSQL_NUM, you only get number indices
Additions:
PHP has a great set of functions for accessing a MySQL database
==using php to fetch data from mysql==
There are four ways to fetch a row of data from mysql
$row = mysql_fetch_array() == MYSQL_BOTH (default), you'll get an array with both associative and number indices.
$row = mysql_fetch_assoc() ==MYSQL_ASSOC, you only get associative indices
$row = mysql_fetch_row() == MYSQL_NUM, you only get number indices
$row = mysql_fetch_object()
==test.php==
==output==
==using php to fetch data from mysql==
There are four ways to fetch a row of data from mysql
$row = mysql_fetch_array() == MYSQL_BOTH (default), you'll get an array with both associative and number indices.
$row = mysql_fetch_assoc() ==MYSQL_ASSOC, you only get associative indices
$row = mysql_fetch_row() == MYSQL_NUM, you only get number indices
$row = mysql_fetch_object()
==test.php==
==output==
Deletions:
output
Additions:
----
REFERRERS
{{backlinks}}
Additions:
test.php
output
Array
(
[0] => information_schema
)
Array
(
[0] => mysql
)
output
Array
(
[0] => information_schema
)
Array
(
[0] => mysql
)