-- Insert data into the webcams table only if the URL is not null INSERT INTO webcams (title, description, url) SELECT :title, :description, :url WHERE :url IS NOT NULL; -- Display a datagrid with the existing webcams SELECT 'datagrid' AS component, 'Live Web Cams' AS title; SELECT title AS title, description AS description, url AS link, url AS image_url FROM webcams; -- Form definition for adding a webcam SELECT 'form' AS component, 'Add a webcam:' AS title; SELECT 'title' AS name, '(a short title)' AS description; SELECT 'description' AS name, 'describe the cam' AS placeholder, 'textarea' AS type; SELECT 'url' AS name, 'http://' AS value, TRUE AS required;