more sql.php changes