penguinspeaks
Technical User
Stored Procedures and triggers
I am still newish and inexperienced in MySql databases. I am using them for my Classic ASP websites.
Here is what I am seeking help with.
I have the following query:
I need this to execute every time there is a new insert on the stories table(each time a new story is uploaded).
The query works when run manually. I tried using the trigger builder wizard that is is PhpMyAdmin.
That caused errors that I couldn't see(could not scroll).
How can I create and execute this trigger??
Thanks
Jeff
Thanks,
Penguin
Please keep in mind that I am using classic ASP with MySQL database. Not sure if that information helps or not.
I am still newish and inexperienced in MySql databases. I am using them for my Classic ASP websites.
Here is what I am seeking help with.
I have the following query:
Code:
DELETE FROM STORY_TAGS;
INSERT INTO STORY_TAGS (TAGS_)
SELECT DISTINCT SUBSTRING_INDEX(SUBSTRING_INDEX(TAGS_,',',mCtr),',',-1) AS
valsAsRows FROM (SELECT (cb.ctr*cc.ctr)+ca.ctr AS mCtr FROM (SELECT 1 ctr
UNION SELECT 2 UNION SELECT 3 UNION SELECT 4) ca CROSS JOIN (SELECT 0 ctr
UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4) cb CROSS JOIN
(SELECT 0 ctr UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4)
cc GROUP BY mCtr) mc CROSS JOIN STORIES GROUP BY valsAsRows;
I need this to execute every time there is a new insert on the stories table(each time a new story is uploaded).
The query works when run manually. I tried using the trigger builder wizard that is is PhpMyAdmin.
That caused errors that I couldn't see(could not scroll).
How can I create and execute this trigger??
Thanks
Jeff
Thanks,
Penguin
Please keep in mind that I am using classic ASP with MySQL database. Not sure if that information helps or not.