mysql_fetch_row($result) - $row[1] no output
Posted: Tue Dec 09, 2008 2:08 am
hi there, this is my first time to post in this forum.
i am having a problem with my php file, particularly in
mysql_query is successful.
i just don't know why $row["record_name"] echos nothing.
hoping for reply asap.
thank you so much.
i am having a problem with my php file, particularly in
Code: Select all
require_once("db_config.php");
$trackNo = $_GET["trackNo"];
$recordNo = (int)substr($_GET["recordNo"],5);
$result = mysql_query("SELECT record_name,record_type_id FROM sra_details WHERE tracking_no='".$trackNo."' AND record_type_id=".$recordNo."");
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysql_fetch_array($result, MYSQL_ASSOC);
echo "Document: ".$row["record_name"];
i just don't know why $row["record_name"] echos nothing.
hoping for reply asap.
thank you so much.