getting single result from mysql in php

mysql result with row 0 is used to retrieve single result. Example :

<?php 
// query.php
$db_server = mysql_connect("localhost", "root", "");
if (! $db_server)
    die("Unable to connect to MySQL: " . mysql_error());

mysql_select_db("test") or die("Unable to select database: " . mysql_error());

$query = "SELECT TA FROM orderingrecords WHERE Basic=900";
$result = mysql_query($query);

if (! $result)
    die("Database access failed: " . mysql_error());

echo mysql_result($result, 0); // 0 for first row

?>