//$project - название проекта //$id - идентификатор текущей картинки include("database/opendb.php3"); $query = "SELECT ind, screen FROM screens WHERE project='MechMinds' ORDER BY ind"; $result = mysql_query ($query, $db_link); $oldid=0; $screen=""; while ($row = mysql_fetch_object ($result)) { if ($id==$row->ind) { $screen = $row->screen; break; } $oldid=$row->ind; } if ($screen!="") { printf("
", $screen); //printf(""); printf("", $screen); } mysql_free_result ($result); printf(""); ?>