Duplicate value returned even though there is only 1 value
Posted: Tue Jan 18, 2005 7:56 pm
Hye
I'm having a small problem
I'm attempting to query a mysql database using php. the problem is that there is only one record in the database table but even still i get two records of the same displayed in my browser. Does anyone have any ideas on how to fix this?
The code for the query is as follows:
mysql_select_db("coachhouse",$connection);
$result = mysql_query ("SELECT * FROM specials",$connection);
while ($row = mysql_fetch_array($result))
{
foreach ($row as $attribute)
PRINT "{$attribute} ";
PRINT "\n";
}
I'm having a small problem
I'm attempting to query a mysql database using php. the problem is that there is only one record in the database table but even still i get two records of the same displayed in my browser. Does anyone have any ideas on how to fix this?
The code for the query is as follows:
mysql_select_db("coachhouse",$connection);
$result = mysql_query ("SELECT * FROM specials",$connection);
while ($row = mysql_fetch_array($result))
{
foreach ($row as $attribute)
PRINT "{$attribute} ";
PRINT "\n";
}