Thread: mysql help
View Single Post
  #1 (permalink)  
Old 2007-01-07, 03:36 AM
frozenboy87 frozenboy87 is offline
Junior Member
 
Join Date: Jan 2007
Posts: 1
frozenboy87 is on a distinguished road
Default mysql help

hi, here is my code... i think something is wrong with it... please help me identify wat's the problem thanks

<?php // process information in body.
// Retrieve information in the head section
$query="SELECT * from imageTable";
$result = mysql_query($query) or die ("Error opening imageTable");
if (mysql_num_rows($result) == 0) {
echo "No rows found, nothing to print so am exiting";
exit;
} else {
echo "Number of rows: ".mysql_num_rows($result).;
echo "Number of fields:".mysql_num_fields($result).;
}
while($row = mysql_fetch_assoc($result))
{
echo $row;
foreach($row as "$key" >= "$value")
{
echo "$value";
}
}
mysql_free_result($result);
?>
===================================
output
===================================
= "$value") { echo "$value"; } } mysql_free_result($result); ?>
===================================

this happen after the ">"sign.. is the syntax wrong or wat???
please answer asap thanks
Reply With Quote