headers_list()

It returns a list of response headers sent

Example

<?php
 setcookie("time",time());
 header('Content-type: text/plain');
 echo "<pre>";
 print_r(headers_list());
 ?>

Output

<pre>Array
 (
 [0] => X-Powered-By: PHP/5.3.3-1ubuntu9.10
 [1] => Set-Cookie: time=1337938449
 [2] => Content-type: text/plain
 )

mysql_unbuffered_query()

It executes a query on a MySQL database and buffering the result

A. Return the first data faster
B. Does not return all data faster
C. Use less memory

Example

<?php
 mysql_pconnect("localhost", "root", "phpcode") or die(mysql_error());
 $db_selected = mysql_select_db("database_name");
 echo mysql_result(mysql_unbuffered_query( "SELECT * FROM users"),1);
 mysql_close();
 ?>

mysql_tablename()

Its deprecated . It returns the table name of field

Example

<?php
mysql_connect(“localhost”, “root”, “phpcode”);
$tables = mysql_list_tables(“database_name”);
for ($i = 0; $i < mysql_num_rows($tables); $i++)
echo mysql_tablename($tables, $i), “<br />”;
?>

Output

Uusers

mysql_stat()

It  the current system status of the MySQL server

Example

<?php
mysql_pconnect(“localhost”, “root”, “phpcode”) or die(mysql_error());
$db_selected = mysql_select_db(“database_name”);
echo mysql_stat();
mysql_close();
?>

Output

Uptime: 18520 Threads: 7 Questions: 3591 Slow queries: 2 Opens: 21411 Flush tables: 1 Open tables: 63 Queries per second avg: 0.193