Hi,
i am trying to display the current records in my database table.
i have uploaded all of the frm files of my db to my host, and the code im using to run this query doesnt seem to work.
<?
$dbuser = "synergy1";
$dbserver = "database";
$dbpass = "synergy1";
$dbname = "synergy1";
//***** BEGIN LISTING THE CONTENTS OF account.frm******
//CONNECTION STRING
mysql_connect($dbserver, $dbuser, $dbpass)
or die ("UNABLE TO CONNECT TO DATABASE");
mysql_select_db($dbname)
or die ("UNABLE TO SELECT DATABASE");
$sql = "SELECT * FROM account.frm";
$result = mysql_query($sql);
if ($myrow = mysql_fetch_array($result)) {
do
{
$Account_Number=$myrow["Account_Number"];
$Employee_ID=$myrow["Employee_ID"];
$Account_Holder_Name=$myrow["Account_Holder_Name"];
$Sort_Code=$myrow["Sort_Code"];
$Bank_Building_Society_Name=$myrow["Bank_Building_Society_Name"];
$Branch_Address_Line_1=$myrow["Branch_Address_Line_1"];
echo "<BR>ACCOUNT_NUMBER: $Account_Number";
echo "<BR>EMPLOYEE_ID: $Employee_ID";
echo "<BR>ACCOUNT_HOLDER_NAME: $Account_Holder_Name";
echo "<BR>SORT_CODE: $Sort_Code";
echo "<BR>BANK_BUILDING_SOCIETY_NAME: $Bank_Building_Society_Name";
echo "<BR>BRANCH_ADDRESS_LINE_1: $Branch_Address_Line_1";
}
while ($myrow = mysql_fetch_array($result));
}
?>
however and error comes up that the
($myrow = mysql_fetch_array($result)) {
do
is incorrect?
is there anyone who has some advice or another script i can use to display the records?
Thanks