Zenphoto refused to install the basic tables to the database so I went through setup.php to find the mysql queries and added them manually. At the bottom of zp_images however was the code
$db_schema[] = "ALTER TABLE $tbl_images ".
"ADD CONSTRAINT $cst_images FOREIGN KEY (`albumid`) REFERENCES $tbl_albums (`id`) ON DELETE CASCADE ON UPDATE CASCADE;";
What is the sql query I convert this to assuming its needed?
Thank you
Comments
But you might want to figure out why setup was not able to do the job as whatever it is may cause other problems within zenphjoto.
ADD CONSTRAINT $cst_images FOREIGN KEY (albumid) REFERENCES 'mark_zenphoto'.'zp_albums' (id) ON DELETE CASCADE ON UPDATE CASCADE)
This is as far as I've got but I know the syntax must be wrong. Also I dont understand what I would translate $cst_images to. Would it be 'mark_zenphoto'.'zp_images_ibjfk1'?
// Prefix the constraint names:
$cst_images = prefix('images_ibfk1');