This query works fine, but there seems to be an error in the definitions as the echos don’t produce.
<?php
$dbname = 'pdartist2';
$table = 'artowrk';
// query
$result = mysql_query("select AID, ThumbFilePath, Title, DisplayOrder from artwork where SCID = $SCID") or die(mysql_error());
while($row = mysql_fetch_row($result)){
$AID = $row['AID'];
$ThumbFilePath = $row['ThumbFilePath'];
$Title = $row['Title'];
$DisplayOrder = $row['DisplayOrder'];
echo "$AID";
echo "$ThumbFilePath";
echo "$Title";
echo "$DisplayOrder";
}
mysql_free_result($result);
?>
mysql_fetch_rowdoes not return associative array, the returned array is a numeric indexed array. so you have to access it using numeric index like the belowIf you want the array to be an associative array, you may try
mysql_fetch_arrayormysql_fetch_assoc