Free Software Server Environment : PhpMySql

HomePage :: Categories :: PageIndex :: RecentChanges


Search this site: FSSE.INFO is produced by "osde8info" :

Revision [161]

Most recent edit made on 2006-09-21 12:29:29 by FsseInfo

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


Deletions:
$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




Revision [160]

Edited on 2006-09-21 12:28:30 by FsseInfo

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


Deletions:
test.php
output




Revision [130]

Edited on 2006-09-18 05:27:34 by FsseInfo

Additions:


REFERRERS
PhpFunctions




Revision [129]

Edited on 2006-09-16 16:09:46 by FsseInfo

Additions:
test.php
output
Array
(
[0] => information_schema
)
Array
(
[0] => mysql
)




Revision [128]

The oldest known version of this page was edited on 2006-09-16 16:06:31 by FsseInfo

PHP MySQL

<?
$db = mysql_connect("localhost", "<mysqlusername>", "<mysqlpassword>");
$res = mysql_query("show databases") ;
echo "<pre>\n" ;
while ( $row = mysql_fetch_row ($res) )
  {
  print_r ($row ) ;
  echo "\n" ;
  }
echo "<pre>\n" ;
?>
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.1652 seconds