Update:SQL Query For photo ID