UPDATE prints
SET
name= '#form.name#',
edition= '#form.edition#',
galleryID= #form.galleryID#,
website= '#form.website#',
dimensions_x= #form.dimensions_x#,
dimensions_y= #form.dimensions_y#,
type1= '#form.type1#',
active= #form.active#
WHERE ID = #URL.ID#
INSERT INTO prints (
name, edition, galleryID, website, dimensions_x, dimensions_y, type1, active
)
VALUES (
'#form.name#', '#form.edition#', #form.galleryID#, '#form.website#', #form.dimensions_x#, #form.dimensions_y#, '#form.type1#', #form.active#)
SELECT @@IDENTITY AS newID
SELECT ID, name
FROM gallery
WHERE ID = #form.galleryID#
Admin: Print Updated
Admin: Print Added